mirror of
https://github.com/krille-chan/fluffychat
synced 2024-08-11 10:33:43 +00:00
fix: noFCM warning dialog
This commit is contained in:
parent
20f9a19397
commit
deda870e99
3 changed files with 14 additions and 7 deletions
|
@ -1290,7 +1290,7 @@
|
|||
"type": "text",
|
||||
"placeholders": {}
|
||||
},
|
||||
"noGoogleServicesWarning": "It seems that you have no google services on your phone. That's a good decision for your privacy! To receive push notifications in FluffyChat we recommend using https://microg.org/ or https://unifiedpush.org/.",
|
||||
"noGoogleServicesWarning": "Firebase Cloud Messaging doesn't appear to be available on your device. To still receive push notifications, we recommend installing MicroG or Unified Push.",
|
||||
"@noGoogleServicesWarning": {
|
||||
"type": "text",
|
||||
"placeholders": {}
|
||||
|
@ -2541,5 +2541,7 @@
|
|||
"banUserDescription": "The user will be banned from the chat and will not be able to enter the chat again until they are unbanned.",
|
||||
"unbanUserDescription": "The user will be able to enter the chat again if they try.",
|
||||
"kickUserDescription": "The user is kicked out of the chat but not banned. In public chats, the user can rejoin at any time.",
|
||||
"makeAdminDescription": "Once you make this user admin, you may not be able to undo this as they will then have the same permissions as you."
|
||||
"makeAdminDescription": "Once you make this user admin, you may not be able to undo this as they will then have the same permissions as you.",
|
||||
"pushNotificationsNotAvailable": "Push notifications not available",
|
||||
"learnMore": "Learn more"
|
||||
}
|
||||
|
|
|
@ -271,7 +271,7 @@ class BackgroundPush {
|
|||
if (matrix == null) {
|
||||
return;
|
||||
}
|
||||
if (await store.getItemBool(SettingKeys.showNoGoogle, true) == true) {
|
||||
if (await store.getItemBool(SettingKeys.showNoGoogle, false) == true) {
|
||||
return;
|
||||
}
|
||||
await loadLocale();
|
||||
|
|
|
@ -376,14 +376,19 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
final result = await showOkCancelAlertDialog(
|
||||
barrierDismissible: true,
|
||||
context: context,
|
||||
title: L10n.of(context)!.oopsSomethingWentWrong,
|
||||
title: L10n.of(context)!.pushNotificationsNotAvailable,
|
||||
message: errorMsg,
|
||||
okLabel:
|
||||
link == null ? L10n.of(context)!.ok : L10n.of(context)!.help,
|
||||
fullyCapitalizedForMaterial: false,
|
||||
okLabel: link == null
|
||||
? L10n.of(context)!.ok
|
||||
: L10n.of(context)!.learnMore,
|
||||
cancelLabel: L10n.of(context)!.doNotShowAgain,
|
||||
);
|
||||
if (result == OkCancelResult.ok && link != null) {
|
||||
launchUrlString(link.toString());
|
||||
launchUrlString(
|
||||
link.toString(),
|
||||
mode: LaunchMode.externalApplication,
|
||||
);
|
||||
}
|
||||
if (result == OkCancelResult.cancel) {
|
||||
await store.setItemBool(SettingKeys.showNoGoogle, true);
|
||||
|
|
Loading…
Reference in a new issue