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()
|
set(bottomActions) = prefs.edit().putBoolean(BOTTOM_ACTIONS, bottomActions).apply()
|
||||||
|
|
||||||
fun removeLastVideoPosition(path: String) {
|
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) {
|
fun saveLastVideoPosition(path: String, value: Int) {
|
||||||
if (!path.isEmpty()) {
|
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 {
|
fun getLastVideoPosition(path: String): Int {
|
||||||
val value = prefs.getInt(LAST_VIDEO_POSITION_PREFIX + path.toLowerCase(), 0)
|
return prefs.getInt("$LAST_VIDEO_POSITION_PREFIX${path.toLowerCase()}", 0)
|
||||||
return value
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAllLastVideoPositions() = prefs.all.filterKeys { it.startsWith(LAST_VIDEO_POSITION_PREFIX) }
|
fun getAllLastVideoPositions() = prefs.all.filterKeys { it.startsWith(LAST_VIDEO_POSITION_PREFIX) }
|
||||||
|
|
Loading…
Reference in a new issue