reset all remembered video positions on toggling the settings item
This commit is contained in:
parent
d1d2be6483
commit
439d189b00
1 changed files with 8 additions and 1 deletions
|
@ -393,7 +393,14 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
|
|
||||||
var rememberLastVideoPosition: Boolean
|
var rememberLastVideoPosition: Boolean
|
||||||
get() = prefs.getBoolean(REMEMBER_LAST_VIDEO_POSITION, false)
|
get() = prefs.getBoolean(REMEMBER_LAST_VIDEO_POSITION, false)
|
||||||
set(rememberLastVideoPosition) = prefs.edit().putBoolean(REMEMBER_LAST_VIDEO_POSITION, rememberLastVideoPosition).apply()
|
set(rememberLastVideoPosition) {
|
||||||
|
if (!rememberLastVideoPosition) {
|
||||||
|
getAllLastVideoPositions().forEach {
|
||||||
|
prefs.edit().remove(it.key).apply()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
prefs.edit().putBoolean(REMEMBER_LAST_VIDEO_POSITION, rememberLastVideoPosition).apply()
|
||||||
|
}
|
||||||
|
|
||||||
var visibleBottomActions: Int
|
var visibleBottomActions: Int
|
||||||
get() = prefs.getInt(VISIBLE_BOTTOM_ACTIONS, DEFAULT_BOTTOM_ACTIONS)
|
get() = prefs.getInt(VISIBLE_BOTTOM_ACTIONS, DEFAULT_BOTTOM_ACTIONS)
|
||||||
|
|
Loading…
Reference in a new issue