mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-03 23:58:55 +01:00 
			
		
		
		
	Exclude some more app state preferences from backups
This commit is contained in:
		@@ -50,7 +50,7 @@ object Migrations {
 | 
			
		||||
        backupPreferences: BackupPreferences,
 | 
			
		||||
        trackerManager: TrackerManager,
 | 
			
		||||
    ): Boolean {
 | 
			
		||||
        val lastVersionCode = preferenceStore.getInt("last_version_code", 0)
 | 
			
		||||
        val lastVersionCode = preferenceStore.getInt(Preference.appStateKey("last_version_code"), 0)
 | 
			
		||||
        val oldVersion = lastVersionCode.get()
 | 
			
		||||
        if (oldVersion < BuildConfig.VERSION_CODE) {
 | 
			
		||||
            lastVersionCode.set(BuildConfig.VERSION_CODE)
 | 
			
		||||
@@ -396,7 +396,7 @@ object Migrations {
 | 
			
		||||
                    newKey = { Preference.privateKey(it) },
 | 
			
		||||
                )
 | 
			
		||||
            }
 | 
			
		||||
            if (oldVersion < 108) {
 | 
			
		||||
            if (oldVersion < 110) {
 | 
			
		||||
                val prefsToReplace = listOf(
 | 
			
		||||
                    "pref_download_only",
 | 
			
		||||
                    "incognito_mode",
 | 
			
		||||
@@ -406,6 +406,9 @@ object Migrations {
 | 
			
		||||
                    "library_update_last_timestamp",
 | 
			
		||||
                    "library_unseen_updates_count",
 | 
			
		||||
                    "last_used_category",
 | 
			
		||||
                    "last_app_check",
 | 
			
		||||
                    "last_ext_check",
 | 
			
		||||
                    "last_version_code",
 | 
			
		||||
                )
 | 
			
		||||
                replacePreferences(
 | 
			
		||||
                    preferenceStore = preferenceStore,
 | 
			
		||||
 
 | 
			
		||||
@@ -28,7 +28,7 @@ internal class ExtensionGithubApi {
 | 
			
		||||
    private val json: Json by injectLazy()
 | 
			
		||||
 | 
			
		||||
    private val lastExtCheck: Preference<Long> by lazy {
 | 
			
		||||
        preferenceStore.getLong("last_ext_check", 0)
 | 
			
		||||
        preferenceStore.getLong(Preference.appStateKey("last_ext_check"), 0)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private var requiresFallbackSource = false
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user