feat: make music directory section optional

This commit is contained in:
antonio 2023-07-02 19:36:39 +02:00
parent a9b264004c
commit a508ec0af6
4 changed files with 20 additions and 0 deletions

View file

@ -30,6 +30,7 @@ object Preferences {
private const val ROUNDED_CORNER_SIZE = "rounded_corner_size"
private const val PODCAST_SECTION_VISIBILITY = "podcast_section_visibility"
private const val RADIO_SECTION_VISIBILITY = "radio_section_visibility"
private const val MUSIC_DIRECTORY_SECTION_VISIBILITY = "music_directory_section_visibility"
@JvmStatic
fun getServer(): String? {
@ -240,4 +241,9 @@ object Preferences {
fun setRadioSectionHidden() {
App.getInstance().preferences.edit().putBoolean(RADIO_SECTION_VISIBILITY, false).apply()
}
@JvmStatic
fun isMusicDirectorySectionVisible(): Boolean {
return App.getInstance().preferences.getBoolean(MUSIC_DIRECTORY_SECTION_VISIBILITY, true)
}
}