minor code style updates

This commit is contained in:
Tibor Kaputa 2019-04-01 12:20:43 +02:00 committed by GitHub
parent ee18bdfb89
commit 64c98d2b1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -385,11 +385,11 @@ class Config(context: Context) : BaseConfig(context) {
} }
} }
fun getLastVideoPosition(path: String): Int { fun getLastVideoPosition(path: String) = prefs.getInt("$LAST_VIDEO_POSITION_PREFIX${path.toLowerCase()}", 0)
return prefs.getInt("$LAST_VIDEO_POSITION_PREFIX${path.toLowerCase()}", 0)
}
fun getAllLastVideoPositions() = prefs.all.filterKeys { it.startsWith(LAST_VIDEO_POSITION_PREFIX) } fun getAllLastVideoPositions() = prefs.all.filterKeys {
it.startsWith(LAST_VIDEO_POSITION_PREFIX)
}
var rememberLastVideoPosition: Boolean var rememberLastVideoPosition: Boolean
get() = prefs.getBoolean(REMEMBER_LAST_VIDEO_POSITION, false) get() = prefs.getBoolean(REMEMBER_LAST_VIDEO_POSITION, false)