mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Removed unused preference
This commit is contained in:
parent
a54ba3ddaf
commit
90df6e5fc9
3 changed files with 9 additions and 45 deletions
|
|
@ -16,7 +16,6 @@ object Preferences {
|
|||
private const val SKIP_SILENCE = "skip_silence"
|
||||
private const val IMAGE_CACHE_SIZE = "image_cache_size"
|
||||
private const val IMAGE_SIZE = "image_size"
|
||||
private const val MEDIA_CACHE_SIZE = "media_cache_size"
|
||||
private const val MAX_BITRATE_WIFI = "max_bitrate_wifi"
|
||||
private const val MAX_BITRATE_MOBILE = "max_bitrate_mobile"
|
||||
private const val AUDIO_TRANSCODE_FORMAT_WIFI = "audio_transcode_format_wifi"
|
||||
|
|
@ -26,11 +25,6 @@ object Preferences {
|
|||
private const val SERVER_UNREACHABLE = "server_unreachable"
|
||||
private const val SYNC_STARRED_TRACKS_FOR_OFFLINE_USE = "sync_starred_tracks_for_offline_use"
|
||||
|
||||
@JvmStatic
|
||||
fun getTheme(): String? {
|
||||
return App.getInstance().preferences.getString(THEME, ThemeHelper.DEFAULT_MODE)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
return App.getInstance().preferences.getString(SERVER, null)
|
||||
|
|
@ -124,13 +118,7 @@ object Preferences {
|
|||
|
||||
@JvmStatic
|
||||
fun getImageCacheSize(): Int {
|
||||
return App.getInstance().preferences.getString(IMAGE_CACHE_SIZE, "400000000")!!
|
||||
.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getMediaCacheSize(): Int {
|
||||
return App.getInstance().preferences.getString(MEDIA_CACHE_SIZE, "400000000")!!
|
||||
return App.getInstance().preferences.getString(IMAGE_CACHE_SIZE, "500")!!
|
||||
.toInt()
|
||||
}
|
||||
|
||||
|
|
@ -181,16 +169,12 @@ object Preferences {
|
|||
.getBoolean(SYNC_STARRED_TRACKS_FOR_OFFLINE_USE, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setStarredSyncEnabled(isStarredSyncEnabled: Boolean) {
|
||||
App.getInstance().preferences.edit().putBoolean(
|
||||
SYNC_STARRED_TRACKS_FOR_OFFLINE_USE, isStarredSyncEnabled
|
||||
).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun showServerUnreachableDialog(): Boolean {
|
||||
return App.getInstance().preferences.getLong(SERVER_UNREACHABLE, 0) + 360000 < System.currentTimeMillis()
|
||||
return App.getInstance().preferences.getLong(
|
||||
SERVER_UNREACHABLE,
|
||||
0
|
||||
) + 360000 < System.currentTimeMillis()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue