diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt index 856bb71ae..4cfcc5cd9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt @@ -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) }