mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
reset all remembered video positions on toggling the settings item
This commit is contained in:
@ -393,7 +393,14 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
|
||||
var rememberLastVideoPosition: Boolean
|
||||
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
|
||||
get() = prefs.getInt(VISIBLE_BOTTOM_ACTIONS, DEFAULT_BOTTOM_ACTIONS)
|
||||
|
Reference in New Issue
Block a user