Only attempt to do a manual app backup, if it is actually enabled
This commit is contained in:
parent
7d6ab6f8e0
commit
dbb40a4a5b
1 changed files with 4 additions and 3 deletions
|
@ -224,12 +224,13 @@ internal class SettingsViewModel(
|
|||
|
||||
internal fun backupNow() {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val isAppBackupEnabled = backupManager.isBackupEnabled
|
||||
if (settingsManager.isStorageBackupEnabled()) {
|
||||
val i = Intent(app, StorageBackupService::class.java)
|
||||
// this starts an app backup afterwards
|
||||
i.putExtra(EXTRA_START_APP_BACKUP, true)
|
||||
// this starts an app backup afterwards (if enabled)
|
||||
i.putExtra(EXTRA_START_APP_BACKUP, isAppBackupEnabled)
|
||||
startForegroundService(app, i)
|
||||
} else {
|
||||
} else if (isAppBackupEnabled) {
|
||||
AppBackupWorker.scheduleNow(app, reschedule = !pluginManager.isOnRemovableDrive)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue