feat: added an option to prevent phone from going into sleep mode if in-app

This commit is contained in:
antonio 2024-01-28 23:22:03 +01:00
parent cd44368d66
commit 634de67d74
5 changed files with 35 additions and 0 deletions

View file

@ -46,6 +46,7 @@ object Preferences {
private const val SKIP_MIN_STAR_RATING = "skip_min_star_rating"
private const val MIN_STAR_RATING = "min_star_rating"
private const val ARTIST_ALBUM_LAYOUT = "artist_album_layout"
private const val ALWAYS_ON_DISPLAY = "always_on_display"
@JvmStatic
@ -357,4 +358,9 @@ object Preferences {
App.getInstance().preferences.edit().putBoolean(ARTIST_ALBUM_LAYOUT, isArtistAlbumLayoutHorizontal)
.apply()
}
@JvmStatic
fun isDisplayAlwaysOn(): Boolean {
return App.getInstance().preferences.getBoolean(ALWAYS_ON_DISPLAY, false)
}
}