mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Unhide genre from album details view (#161)
This commit is contained in:
commit
fa430eaac4
4 changed files with 19 additions and 0 deletions
|
|
@ -248,6 +248,10 @@ public class AlbumPageFragment extends Fragment implements ClickCallback {
|
||||||
bind.albumDetailView.setVisibility(View.GONE);
|
bind.albumDetailView.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(Preferences.showAlbumDetail()){
|
||||||
|
bind.albumDetailView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initAlbumInfoTextButton() {
|
private void initAlbumInfoTextButton() {
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,7 @@ object Preferences {
|
||||||
private const val EQUALIZER_ENABLED = "equalizer_enabled"
|
private const val EQUALIZER_ENABLED = "equalizer_enabled"
|
||||||
private const val EQUALIZER_BAND_LEVELS = "equalizer_band_levels"
|
private const val EQUALIZER_BAND_LEVELS = "equalizer_band_levels"
|
||||||
private const val MINI_SHUFFLE_BUTTON_VISIBILITY = "mini_shuffle_button_visibility"
|
private const val MINI_SHUFFLE_BUTTON_VISIBILITY = "mini_shuffle_button_visibility"
|
||||||
|
private const val ALBUM_DETAIL = "album_detail"
|
||||||
private const val ALBUM_SORT_ORDER = "album_sort_order"
|
private const val ALBUM_SORT_ORDER = "album_sort_order"
|
||||||
private const val DEFAULT_ALBUM_SORT_ORDER = Constants.ALBUM_ORDER_BY_NAME
|
private const val DEFAULT_ALBUM_SORT_ORDER = Constants.ALBUM_ORDER_BY_NAME
|
||||||
|
|
||||||
|
|
@ -641,6 +642,11 @@ object Preferences {
|
||||||
return ShortArray(bandCount.toInt()) { i -> parts[i].toShortOrNull() ?: 0 }
|
return ShortArray(bandCount.toInt()) { i -> parts[i].toShortOrNull() ?: 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun showAlbumDetail(): Boolean {
|
||||||
|
return App.getInstance().preferences.getBoolean(ALBUM_DETAIL, false)
|
||||||
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun getAlbumSortOrder(): String {
|
fun getAlbumSortOrder(): String {
|
||||||
return App.getInstance().preferences.getString(ALBUM_SORT_ORDER, DEFAULT_ALBUM_SORT_ORDER) ?: DEFAULT_ALBUM_SORT_ORDER
|
return App.getInstance().preferences.getString(ALBUM_SORT_ORDER, DEFAULT_ALBUM_SORT_ORDER) ?: DEFAULT_ALBUM_SORT_ORDER
|
||||||
|
|
|
||||||
|
|
@ -523,4 +523,7 @@
|
||||||
<string name="equalizer_not_supported">Not supported on this device</string>
|
<string name="equalizer_not_supported">Not supported on this device</string>
|
||||||
<string name="settings_app_equalizer">Equalizer</string>
|
<string name="settings_app_equalizer">Equalizer</string>
|
||||||
<string name="settings_app_equalizer_summary">Open the built-in equalizer</string>
|
<string name="settings_app_equalizer_summary">Open the built-in equalizer</string>
|
||||||
|
|
||||||
|
<string name="settings_album_detail">Show album detail</string>
|
||||||
|
<string name="settings_album_detail_summary">If enabled, show the album details like genre, song count etc. on the album page</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,12 @@
|
||||||
android:summary="@string/settings_music_directory_summary"
|
android:summary="@string/settings_music_directory_summary"
|
||||||
android:key="music_directory_section_visibility" />
|
android:key="music_directory_section_visibility" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:title="@string/settings_album_detail"
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:summary="@string/settings_album_detail_summary"
|
||||||
|
android:key="album_detail" />
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<PreferenceCategory app:title="@string/settings_title_playlist">
|
<PreferenceCategory app:title="@string/settings_title_playlist">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue