mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
Use Kotlin way of concatenation
This commit is contained in:
parent
062fe21567
commit
56723320aa
1 changed files with 3 additions and 4 deletions
|
@ -376,18 +376,17 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
set(bottomActions) = prefs.edit().putBoolean(BOTTOM_ACTIONS, bottomActions).apply()
|
||||
|
||||
fun removeLastVideoPosition(path: String) {
|
||||
prefs.edit().remove(LAST_VIDEO_POSITION_PREFIX + path.toLowerCase()).apply()
|
||||
prefs.edit().remove("$LAST_VIDEO_POSITION_PREFIX${path.toLowerCase()}").apply()
|
||||
}
|
||||
|
||||
fun saveLastVideoPosition(path: String, value: Int) {
|
||||
if (!path.isEmpty()) {
|
||||
prefs.edit().putInt(LAST_VIDEO_POSITION_PREFIX + path.toLowerCase(), value).apply()
|
||||
prefs.edit().putInt("$LAST_VIDEO_POSITION_PREFIX${path.toLowerCase()}", value).apply()
|
||||
}
|
||||
}
|
||||
|
||||
fun getLastVideoPosition(path: String): Int {
|
||||
val value = prefs.getInt(LAST_VIDEO_POSITION_PREFIX + path.toLowerCase(), 0)
|
||||
return value
|
||||
return prefs.getInt("$LAST_VIDEO_POSITION_PREFIX${path.toLowerCase()}", 0)
|
||||
}
|
||||
|
||||
fun getAllLastVideoPositions() = prefs.all.filterKeys { it.startsWith(LAST_VIDEO_POSITION_PREFIX) }
|
||||
|
|
Loading…
Reference in a new issue