From 372830b6d497d1cbf820e647ae7b2eb374731a21 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 21 Jul 2021 18:14:07 -0400 Subject: [PATCH] Relax MIUI backup/restore warning Closes #965 --- .../kanade/tachiyomi/ui/setting/SettingsBackupController.kt | 5 ++++- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt index 8bfd850492..3592e9d89c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt @@ -54,6 +54,10 @@ class SettingsBackupController : SettingsController() { summaryRes = R.string.can_be_used_to_restore onClick { + if (MiuiUtil.isMiui() && MiuiUtil.isMiuiOptimizationDisabled()) { + context.toast(R.string.restore_miui_warning, Toast.LENGTH_LONG) + } + if (!BackupCreateService.isRunning(context)) { val ctrl = CreateBackupDialog() ctrl.targetController = this@SettingsBackupController @@ -71,7 +75,6 @@ class SettingsBackupController : SettingsController() { onClick { if (MiuiUtil.isMiui() && MiuiUtil.isMiuiOptimizationDisabled()) { context.toast(R.string.restore_miui_warning, Toast.LENGTH_LONG) - return@onClick } if (!BackupRestoreService.isRunning(context)) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index fd56552794..365ef8bada 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -714,7 +714,7 @@ What do you want to backup? Restoring backup %02d min, %02d sec - MIUI Optimization must be enabled for restore to work correctly. + Backup/restore may not function properly if MIUI Optimization is disabled. Progress Complete