mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 03:52:15 +02:00
Fix deprecations on Preferences.kt
+ cleaned a suppressing which had no use
This commit is contained in:
parent
5844ce1178
commit
8efea26e98
@ -210,13 +210,12 @@ class Preferences : AnkiActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("deprecation") // startActivity
|
||||
fun restartWithNewDeckPicker() {
|
||||
// PERF: DB access on foreground thread
|
||||
CollectionHelper.getInstance().closeCollection(true, "Preference Modification: collection path changed")
|
||||
val deckPicker = Intent(this, DeckPicker::class.java)
|
||||
deckPicker.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
startActivity(deckPicker)
|
||||
startActivityWithAnimation(deckPicker, ActivityTransitionAnimation.Direction.DEFAULT)
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
@ -805,7 +804,6 @@ class Preferences : AnkiActivity() {
|
||||
override val analyticsScreenNameConstant: String
|
||||
get() = "prefs.appearance"
|
||||
|
||||
@Suppress("deprecation") // startActivityForResult
|
||||
override fun initSubscreen() {
|
||||
addPreferencesFromResource(R.xml.preferences_appearance)
|
||||
mBackgroundImage = requirePreference<SwitchPreference>("deckPickerBackground")
|
||||
|
Loading…
Reference in New Issue
Block a user