fix: noFCM warning dialog

This commit is contained in:
krille-chan 2023-10-28 11:30:02 +02:00
commit deda870e99
No known key found for this signature in database
3 changed files with 14 additions and 7 deletions

View file

@ -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();

View file

@ -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);