feat: Add donation buttons except for PlayStore&AppStore version
This commit is contained in:
parent
90ec0013f1
commit
c434b3dddc
3 changed files with 19 additions and 1 deletions
|
|
@ -3410,5 +3410,6 @@
|
||||||
"type": "String"
|
"type": "String"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"donate": "Donate"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,17 @@ class ClientChooserButton extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (Matrix.of(context).backgroundPush?.firebaseEnabled == false)
|
||||||
|
PopupMenuItem(
|
||||||
|
value: SettingsAction.support,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
const Icon(Icons.favorite, color: Colors.red),
|
||||||
|
const SizedBox(width: 18),
|
||||||
|
Text(L10n.of(context).donate),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
value: SettingsAction.settings,
|
value: SettingsAction.settings,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
@ -207,6 +218,9 @@ class ClientChooserButton extends StatelessWidget {
|
||||||
case SettingsAction.invite:
|
case SettingsAction.invite:
|
||||||
FluffyShare.shareInviteLink(context);
|
FluffyShare.shareInviteLink(context);
|
||||||
break;
|
break;
|
||||||
|
case SettingsAction.support:
|
||||||
|
// TODO: Implement me
|
||||||
|
break;
|
||||||
case SettingsAction.settings:
|
case SettingsAction.settings:
|
||||||
context.go('/rooms/settings');
|
context.go('/rooms/settings');
|
||||||
break;
|
break;
|
||||||
|
|
@ -226,6 +240,7 @@ enum SettingsAction {
|
||||||
newGroup,
|
newGroup,
|
||||||
setStatus,
|
setStatus,
|
||||||
invite,
|
invite,
|
||||||
|
support,
|
||||||
settings,
|
settings,
|
||||||
archive,
|
archive,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ class BackgroundPush {
|
||||||
}
|
}
|
||||||
|
|
||||||
final pendingTests = <String, Completer<void>>{};
|
final pendingTests = <String, Completer<void>>{};
|
||||||
|
bool firebaseEnabled = false;
|
||||||
|
|
||||||
//<GOOGLE_SERVICES>final firebase = FcmSharedIsolate();
|
//<GOOGLE_SERVICES>final firebase = FcmSharedIsolate();
|
||||||
|
|
||||||
|
|
@ -74,6 +75,7 @@ class BackgroundPush {
|
||||||
bool upAction = false;
|
bool upAction = false;
|
||||||
|
|
||||||
void _init() async {
|
void _init() async {
|
||||||
|
//<GOOGLE_SERVICES>firebaseEnabled = true;
|
||||||
try {
|
try {
|
||||||
if (PlatformInfos.isAndroid) {
|
if (PlatformInfos.isAndroid) {
|
||||||
final port = ReceivePort();
|
final port = ReceivePort();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue