mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-28 17:19:00 +03:00
add backup flags setting
This commit is contained in:
parent
0e0b886e46
commit
8354c4e7da
1 changed files with 24 additions and 0 deletions
|
@ -52,6 +52,11 @@ import eu.kanade.tachiyomi.data.backup.BackupCreatorJob
|
|||
import eu.kanade.tachiyomi.data.backup.BackupFileValidator
|
||||
import eu.kanade.tachiyomi.data.backup.BackupRestoreService
|
||||
import eu.kanade.tachiyomi.data.backup.full.models.Backup
|
||||
import eu.kanade.tachiyomi.data.preference.FLAG_CATEGORIES
|
||||
import eu.kanade.tachiyomi.data.preference.FLAG_CHAPTERS
|
||||
import eu.kanade.tachiyomi.data.preference.FLAG_HISTORY
|
||||
import eu.kanade.tachiyomi.data.preference.FLAG_SETTINGS
|
||||
import eu.kanade.tachiyomi.data.preference.FLAG_TRACK
|
||||
import eu.kanade.tachiyomi.util.system.DeviceUtil
|
||||
import eu.kanade.tachiyomi.util.system.copyToClipboard
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
|
@ -400,6 +405,25 @@ class SettingsBackupScreen : SearchableSettings {
|
|||
title = stringResource(R.string.pref_backup_slots),
|
||||
entries = listOf(2, 3, 4, 5).associateWith { it.toString() },
|
||||
),
|
||||
Preference.PreferenceItem.MultiSelectListPreference(
|
||||
pref = backupPreferences.backupFlags(),
|
||||
enabled = backupInterval != 0,
|
||||
title = stringResource(R.string.pref_backup_flags),
|
||||
subtitle = stringResource(R.string.pref_backup_flags_summ),
|
||||
entries = mapOf(
|
||||
FLAG_CATEGORIES to stringResource(R.string.general_categories),
|
||||
FLAG_CHAPTERS to stringResource(R.string.chapters_episodes),
|
||||
FLAG_HISTORY to stringResource(R.string.history),
|
||||
FLAG_TRACK to stringResource(R.string.track),
|
||||
FLAG_SETTINGS to stringResource(R.string.settings),
|
||||
),
|
||||
onValueChanged = {
|
||||
if (it.contains(FLAG_SETTINGS)) {
|
||||
context.toast(R.string.backup_settings_warning, Toast.LENGTH_LONG)
|
||||
}
|
||||
true
|
||||
},
|
||||
),
|
||||
Preference.PreferenceItem.InfoPreference(stringResource(R.string.backup_info)),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue