Allow sync Feeds & extensionRepoSettings
This commit is contained in:
parent
87133eb571
commit
be9dbc50ea
4 changed files with 25 additions and 3 deletions
|
|
@ -53,12 +53,14 @@ class SyncPreferences(
|
||||||
tracking = preferenceStore.getBoolean("tracking", true).get(),
|
tracking = preferenceStore.getBoolean("tracking", true).get(),
|
||||||
history = preferenceStore.getBoolean("history", true).get(),
|
history = preferenceStore.getBoolean("history", true).get(),
|
||||||
appSettings = preferenceStore.getBoolean("appSettings", true).get(),
|
appSettings = preferenceStore.getBoolean("appSettings", true).get(),
|
||||||
|
extensionRepoSettings = preferenceStore.getBoolean("extensionRepoSettings", true).get(),
|
||||||
sourceSettings = preferenceStore.getBoolean("sourceSettings", true).get(),
|
sourceSettings = preferenceStore.getBoolean("sourceSettings", true).get(),
|
||||||
privateSettings = preferenceStore.getBoolean("privateSettings", true).get(),
|
privateSettings = preferenceStore.getBoolean("privateSettings", true).get(),
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
customInfo = preferenceStore.getBoolean("customInfo", true).get(),
|
customInfo = preferenceStore.getBoolean("customInfo", true).get(),
|
||||||
readEntries = preferenceStore.getBoolean("readEntries", true).get(),
|
readEntries = preferenceStore.getBoolean("readEntries", true).get(),
|
||||||
|
savedSearchesFeeds = preferenceStore.getBoolean("savedSearchesFeeds", true).get(),
|
||||||
// SY <--
|
// SY <--
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -70,12 +72,14 @@ class SyncPreferences(
|
||||||
preferenceStore.getBoolean("tracking", true).set(syncSettings.tracking)
|
preferenceStore.getBoolean("tracking", true).set(syncSettings.tracking)
|
||||||
preferenceStore.getBoolean("history", true).set(syncSettings.history)
|
preferenceStore.getBoolean("history", true).set(syncSettings.history)
|
||||||
preferenceStore.getBoolean("appSettings", true).set(syncSettings.appSettings)
|
preferenceStore.getBoolean("appSettings", true).set(syncSettings.appSettings)
|
||||||
|
preferenceStore.getBoolean("extensionRepoSettings", true).set(syncSettings.extensionRepoSettings)
|
||||||
preferenceStore.getBoolean("sourceSettings", true).set(syncSettings.sourceSettings)
|
preferenceStore.getBoolean("sourceSettings", true).set(syncSettings.sourceSettings)
|
||||||
preferenceStore.getBoolean("privateSettings", true).set(syncSettings.privateSettings)
|
preferenceStore.getBoolean("privateSettings", true).set(syncSettings.privateSettings)
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
preferenceStore.getBoolean("customInfo", true).set(syncSettings.customInfo)
|
preferenceStore.getBoolean("customInfo", true).set(syncSettings.customInfo)
|
||||||
preferenceStore.getBoolean("readEntries", true).set(syncSettings.readEntries)
|
preferenceStore.getBoolean("readEntries", true).set(syncSettings.readEntries)
|
||||||
|
preferenceStore.getBoolean("savedSearchesFeeds", true).set(syncSettings.savedSearchesFeeds)
|
||||||
// SY <--
|
// SY <--
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,13 @@ data class SyncSettings(
|
||||||
val tracking: Boolean = true,
|
val tracking: Boolean = true,
|
||||||
val history: Boolean = true,
|
val history: Boolean = true,
|
||||||
val appSettings: Boolean = true,
|
val appSettings: Boolean = true,
|
||||||
|
val extensionRepoSettings: Boolean = true,
|
||||||
val sourceSettings: Boolean = true,
|
val sourceSettings: Boolean = true,
|
||||||
val privateSettings: Boolean = false,
|
val privateSettings: Boolean = false,
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
val customInfo: Boolean = true,
|
val customInfo: Boolean = true,
|
||||||
val readEntries: Boolean = true,
|
val readEntries: Boolean = true,
|
||||||
|
val savedSearchesFeeds: Boolean = true,
|
||||||
// SY <--
|
// SY <--
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -122,12 +122,14 @@ private class SyncSettingsSelectorModel(
|
||||||
tracking = syncSettings.tracking,
|
tracking = syncSettings.tracking,
|
||||||
history = syncSettings.history,
|
history = syncSettings.history,
|
||||||
appSettings = syncSettings.appSettings,
|
appSettings = syncSettings.appSettings,
|
||||||
|
extensionRepoSettings = syncSettings.extensionRepoSettings,
|
||||||
sourceSettings = syncSettings.sourceSettings,
|
sourceSettings = syncSettings.sourceSettings,
|
||||||
privateSettings = syncSettings.privateSettings,
|
privateSettings = syncSettings.privateSettings,
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
customInfo = syncSettings.customInfo,
|
customInfo = syncSettings.customInfo,
|
||||||
readEntries = syncSettings.readEntries,
|
readEntries = syncSettings.readEntries,
|
||||||
|
savedSearchesFeeds = syncSettings.savedSearchesFeeds,
|
||||||
// SY <--
|
// SY <--
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -140,12 +142,14 @@ private class SyncSettingsSelectorModel(
|
||||||
tracking = backupOptions.tracking,
|
tracking = backupOptions.tracking,
|
||||||
history = backupOptions.history,
|
history = backupOptions.history,
|
||||||
appSettings = backupOptions.appSettings,
|
appSettings = backupOptions.appSettings,
|
||||||
|
extensionRepoSettings = backupOptions.extensionRepoSettings,
|
||||||
sourceSettings = backupOptions.sourceSettings,
|
sourceSettings = backupOptions.sourceSettings,
|
||||||
privateSettings = backupOptions.privateSettings,
|
privateSettings = backupOptions.privateSettings,
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
customInfo = backupOptions.customInfo,
|
customInfo = backupOptions.customInfo,
|
||||||
readEntries = backupOptions.readEntries,
|
readEntries = backupOptions.readEntries,
|
||||||
|
savedSearchesFeeds = backupOptions.savedSearchesFeeds,
|
||||||
// SY <--
|
// SY <--
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,7 @@ class SyncManager(
|
||||||
chapters = syncOptions.chapters,
|
chapters = syncOptions.chapters,
|
||||||
tracking = syncOptions.tracking,
|
tracking = syncOptions.tracking,
|
||||||
history = syncOptions.history,
|
history = syncOptions.history,
|
||||||
|
extensionRepoSettings = syncOptions.extensionRepoSettings,
|
||||||
appSettings = syncOptions.appSettings,
|
appSettings = syncOptions.appSettings,
|
||||||
sourceSettings = syncOptions.sourceSettings,
|
sourceSettings = syncOptions.sourceSettings,
|
||||||
privateSettings = syncOptions.privateSettings,
|
privateSettings = syncOptions.privateSettings,
|
||||||
|
|
@ -91,6 +92,7 @@ class SyncManager(
|
||||||
// SY -->
|
// SY -->
|
||||||
customInfo = syncOptions.customInfo,
|
customInfo = syncOptions.customInfo,
|
||||||
readEntries = syncOptions.readEntries,
|
readEntries = syncOptions.readEntries,
|
||||||
|
savedSearchesFeeds = syncOptions.savedSearchesFeeds,
|
||||||
// SY <--
|
// SY <--
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -105,11 +107,11 @@ class SyncManager(
|
||||||
backupSourcePreferences = backupCreator.backupSourcePreferences(backupOptions),
|
backupSourcePreferences = backupCreator.backupSourcePreferences(backupOptions),
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
backupSavedSearches = backupCreator.backupSavedSearches(),
|
backupSavedSearches = backupCreator.backupSavedSearches(backupOptions),
|
||||||
// SY <--
|
// SY <--
|
||||||
|
|
||||||
// KMK -->
|
// KMK -->
|
||||||
backupFeeds = backupCreator.backupFeeds(),
|
backupFeeds = backupCreator.backupFeeds(backupOptions),
|
||||||
// KMK <--
|
// KMK <--
|
||||||
)
|
)
|
||||||
logcat(LogPriority.DEBUG) { "End create backup" }
|
logcat(LogPriority.DEBUG) { "End create backup" }
|
||||||
|
|
@ -180,10 +182,15 @@ class SyncManager(
|
||||||
backupSources = remoteBackup.backupSources,
|
backupSources = remoteBackup.backupSources,
|
||||||
backupPreferences = remoteBackup.backupPreferences,
|
backupPreferences = remoteBackup.backupPreferences,
|
||||||
backupSourcePreferences = remoteBackup.backupSourcePreferences,
|
backupSourcePreferences = remoteBackup.backupSourcePreferences,
|
||||||
|
backupExtensionRepo = remoteBackup.backupExtensionRepo,
|
||||||
|
|
||||||
// SY -->
|
// SY -->
|
||||||
backupSavedSearches = remoteBackup.backupSavedSearches,
|
backupSavedSearches = remoteBackup.backupSavedSearches,
|
||||||
// SY <--
|
// SY <--
|
||||||
|
|
||||||
|
// KMK -->
|
||||||
|
backupFeeds = remoteBackup.backupFeeds,
|
||||||
|
// KMK <--
|
||||||
)
|
)
|
||||||
|
|
||||||
// It's local sync no need to restore data. (just update remote data)
|
// It's local sync no need to restore data. (just update remote data)
|
||||||
|
|
@ -201,7 +208,12 @@ class SyncManager(
|
||||||
context,
|
context,
|
||||||
backupUri,
|
backupUri,
|
||||||
sync = true,
|
sync = true,
|
||||||
options = RestoreOptions(),
|
options = RestoreOptions(
|
||||||
|
appSettings = true,
|
||||||
|
sourceSettings = true,
|
||||||
|
libraryEntries = true,
|
||||||
|
extensionRepoSettings = true,
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
// update the sync timestamp
|
// update the sync timestamp
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue