Don't include "app state" preferences in backups

This commit is contained in:
arkon
2023-10-29 12:24:02 -04:00
parent 1aa5222c99
commit ce7bf396eb
9 changed files with 100 additions and 28 deletions

View File

@@ -250,7 +250,9 @@ class BackupCreator(
@Suppress("UNCHECKED_CAST")
private fun Map<String, *>.toBackupPreferences(): List<BackupPreference> {
return this.filterKeys { !Preference.isPrivate(it) }
return this.filterKeys {
!Preference.isPrivate(it) && !Preference.isAppState(it)
}
.mapNotNull { (key, value) ->
when (value) {
is Int -> BackupPreference(key, IntPreferenceValue(value))