Skip to content

Commit

Permalink
update: Remove unnecessary sharedPreferences
Browse files Browse the repository at this point in the history
Remove the following sharedPreferences as they are unnecessary.
- TAB_FILTER_HOME_REPLIES
- TAB_FILTER_HOME_BOOSTS
- TAB_SHOW_HOME_SELF_BOOSTS

Also, update sharedPreferences accordingly.

 Fixes tuskyapp#3536
  • Loading branch information
sanao1006 committed Nov 20, 2023
1 parent af1a496 commit 6d537dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/src/main/java/com/keylesspalace/tusky/TuskyApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ class TuskyApplication : Application(), HasAndroidInjector {
editor.putString(APP_THEME, AppTheme.NIGHT.value)
}
}

if (oldVersion < 2023112001) {
editor.remove(PrefKeys.TAB_FILTER_HOME_REPLIES)
editor.remove(PrefKeys.TAB_FILTER_HOME_BOOSTS)
editor.remove(PrefKeys.TAB_SHOW_HOME_SELF_BOOSTS)
}

editor.putInt(PrefKeys.SCHEMA_VERSION, newVersion)
editor.apply()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ enum class AppTheme(val value: String) {
*
* - Adding a new preference that does not change the interpretation of an existing preference
*/
const val SCHEMA_VERSION = 2023082301
const val SCHEMA_VERSION = 2023112001

/** The schema version for fresh installs */
const val NEW_INSTALL_SCHEMA_VERSION = 0
Expand Down

0 comments on commit 6d537dc

Please sign in to comment.