forked from cwtch.im/cwtch-ui
add popup about disable battery unoptimized; fix mute policy loading
This commit is contained in:
parent
c377a09748
commit
a94fd3547b
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "cy",
|
"@@locale": "cy",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "da",
|
"@@locale": "da",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "de",
|
"@@locale": "de",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "el",
|
"@@locale": "el",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "en",
|
"@@locale": "en",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "es",
|
"@@locale": "es",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
"@@locale": "fr",
|
"@@locale": "fr",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "Cette fonctionnalité nécessite que l’expérience Groupes soit activée dans Paramètres",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Android applique par défaut un profil de gestion de l'énergie \"optimisé\" aux applications, ce qui peut entraîner leur arrêt ou leur suppression. Demandez à Android d'exempter Cwtch de ce profil pour une meilleure stabilité mais une plus grande consommation d'énergie.",
|
||||||
|
"settingAndroidPowerExemption": "Android ignore les optimisations de la batterie",
|
||||||
"messageFormattingDescription": "Activer la mise en forme de texte enrichi dans les messages affichés, par exemple **gras** et *italique*",
|
"messageFormattingDescription": "Activer la mise en forme de texte enrichi dans les messages affichés, par exemple **gras** et *italique*",
|
||||||
"formattingExperiment": "Mise en forme des messages",
|
"formattingExperiment": "Mise en forme des messages",
|
||||||
"clickableLinksWarning": "L'ouverture de cette URL lancera une application en dehors de Cwtch et peut révéler des métadonnées ou compromettre la sécurité de Cwtch. N'ouvrez que les URLs de personnes en qui vous avez confiance. Êtes-vous sûr de vouloir continuer ?",
|
"clickableLinksWarning": "L'ouverture de cette URL lancera une application en dehors de Cwtch et peut révéler des métadonnées ou compromettre la sécurité de Cwtch. N'ouvrez que les URLs de personnes en qui vous avez confiance. Êtes-vous sûr de vouloir continuer ?",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "it",
|
"@@locale": "it",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "lb",
|
"@@locale": "lb",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "no",
|
"@@locale": "no",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pl",
|
"@@locale": "pl",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "pt",
|
"@@locale": "pt",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ro",
|
"@@locale": "ro",
|
||||||
"@@last_modified": "2022-04-13T02:54:41+02:00",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{
|
{
|
||||||
"@@locale": "ru",
|
"@@locale": "ru",
|
||||||
"settingAndroidPowerExemptionDescription": "Android by default applies an \"optimized\" power management profile to apps which can result in them being stopped or killed. Request Android to exempt Cwtch from this for better stability but more power use.",
|
"@@last_modified": "2022-04-13T22:56:39+02:00",
|
||||||
|
"okButton": "OK",
|
||||||
|
"settingsAndroidPowerReenablePopup": "Cannot re-enable Battery Optimization from within Cwtch. Please go to Android \/ Settings \/ Apps \/ Cwtch \/ Battery and set Usage to 'Optimized'",
|
||||||
|
"settingAndroidPowerExemptionDescription": "Optional: Request Android to exempt Cwtch from optimized power management. This will result in better stability at the cost of greater battery use.",
|
||||||
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
"settingAndroidPowerExemption": "Android Ignore Battery Optimizations",
|
||||||
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
"thisFeatureRequiresGroupExpermientsToBeEnabled": "This feature requires the Groups Experiment to be enabled in Settings",
|
||||||
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
"messageFormattingDescription": "Enable rich text formatting in displayed messages e.g. **bold** and *italic*",
|
||||||
|
|
|
@ -109,8 +109,8 @@ class Settings extends ChangeNotifier {
|
||||||
// single pane vs dual pane preferences
|
// single pane vs dual pane preferences
|
||||||
_uiColumnModePortrait = uiColumnModeFromString(settings["UIColumnModePortrait"]);
|
_uiColumnModePortrait = uiColumnModeFromString(settings["UIColumnModePortrait"]);
|
||||||
_uiColumnModeLandscape = uiColumnModeFromString(settings["UIColumnModeLandscape"]);
|
_uiColumnModeLandscape = uiColumnModeFromString(settings["UIColumnModeLandscape"]);
|
||||||
|
|
||||||
_notificationPolicy = notificationPolicyFromString(settings["NotificationPolicy"]);
|
_notificationPolicy = notificationPolicyFromString(settings["NotificationPolicy"]);
|
||||||
|
|
||||||
_notificationContent = notificationContentFromString(settings["NotificationContent"]);
|
_notificationContent = notificationContentFromString(settings["NotificationContent"]);
|
||||||
|
|
||||||
// auto-download folder
|
// auto-download folder
|
||||||
|
@ -275,7 +275,7 @@ class Settings extends ChangeNotifier {
|
||||||
|
|
||||||
static NotificationPolicy notificationPolicyFromString(String? np) {
|
static NotificationPolicy notificationPolicyFromString(String? np) {
|
||||||
switch (np) {
|
switch (np) {
|
||||||
case "NotificationPolicy.None":
|
case "NotificationPolicy.Mute":
|
||||||
return NotificationPolicy.Mute;
|
return NotificationPolicy.Mute;
|
||||||
case "NotificationPolicy.OptIn":
|
case "NotificationPolicy.OptIn":
|
||||||
return NotificationPolicy.OptIn;
|
return NotificationPolicy.OptIn;
|
||||||
|
|
|
@ -227,7 +227,8 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
if (value) {
|
if (value) {
|
||||||
requestBatteryExemption();
|
requestBatteryExemption();
|
||||||
} else {
|
} else {
|
||||||
// We don't ask for it to be turned off, user has to manually in android settings, so this is a NOP
|
// We can't ask for it to be turned off, show an informational popup
|
||||||
|
showBatteryDialog(context);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
activeTrackColor: settings.theme.defaultButtonColor,
|
activeTrackColor: settings.theme.defaultButtonColor,
|
||||||
|
@ -467,6 +468,32 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
showBatteryDialog(BuildContext context) {
|
||||||
|
Widget okButton = ElevatedButton(
|
||||||
|
child: Text(AppLocalizations.of(context)!.okButton),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// set up the AlertDialog
|
||||||
|
AlertDialog alert = AlertDialog(
|
||||||
|
title: Text(AppLocalizations.of(context)!.settingsAndroidPowerReenablePopup),
|
||||||
|
actions: [
|
||||||
|
okButton,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
// show the dialog
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return alert;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Construct a version string from Package Info
|
/// Construct a version string from Package Info
|
||||||
|
|
Loading…
Reference in New Issue