Recreate Backup worker with IS_AUTO_BACKUP_KEY flag (#6742)
* Recreate Backup worker with IS_AUTO_BACKUP_KEY flag * Extra safety net to not delete backup folder
This commit is contained in:
parent
592b9fedb9
commit
86016de6cb
3 changed files with 5 additions and 2 deletions
|
@ -24,7 +24,7 @@ android {
|
||||||
applicationId = "eu.kanade.tachiyomi"
|
applicationId = "eu.kanade.tachiyomi"
|
||||||
minSdk = AndroidConfig.minSdk
|
minSdk = AndroidConfig.minSdk
|
||||||
targetSdk = AndroidConfig.targetSdk
|
targetSdk = AndroidConfig.targetSdk
|
||||||
versionCode = 75
|
versionCode = 76
|
||||||
versionName = "0.13.1"
|
versionName = "0.13.1"
|
||||||
|
|
||||||
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
buildConfigField("String", "COMMIT_COUNT", "\"${getCommitCount()}\"")
|
||||||
|
|
|
@ -256,6 +256,9 @@ object Migrations {
|
||||||
preferences.extensionInstaller().set(PreferenceValues.ExtensionInstaller.LEGACY)
|
preferences.extensionInstaller().set(PreferenceValues.ExtensionInstaller.LEGACY)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (oldVersion < 76) {
|
||||||
|
BackupCreatorJob.setupTask(context)
|
||||||
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ class BackupCreatorJob(private val context: Context, workerParams: WorkerParamet
|
||||||
val uri = inputData.getString(LOCATION_URI_KEY)?.let { Uri.parse(it) }
|
val uri = inputData.getString(LOCATION_URI_KEY)?.let { Uri.parse(it) }
|
||||||
?: preferences.backupsDirectory().get().toUri()
|
?: preferences.backupsDirectory().get().toUri()
|
||||||
val flags = inputData.getInt(BACKUP_FLAGS_KEY, BackupConst.BACKUP_ALL)
|
val flags = inputData.getInt(BACKUP_FLAGS_KEY, BackupConst.BACKUP_ALL)
|
||||||
val isAutoBackup = inputData.getBoolean(IS_AUTO_BACKUP_KEY, false)
|
val isAutoBackup = inputData.getBoolean(IS_AUTO_BACKUP_KEY, true)
|
||||||
|
|
||||||
context.notificationManager.notify(Notifications.ID_BACKUP_PROGRESS, notifier.showBackupProgress().build())
|
context.notificationManager.notify(Notifications.ID_BACKUP_PROGRESS, notifier.showBackupProgress().build())
|
||||||
return try {
|
return try {
|
||||||
|
|
Reference in a new issue