Add sort order menu for artist & album

This commit is contained in:
Nicholas Narsing 2018-04-28 02:07:52 -04:00
commit 32da438ac4
No known key found for this signature in database
GPG key ID: 6C867A2AC16B645A
9 changed files with 138 additions and 0 deletions

View file

@ -222,6 +222,12 @@ public final class PreferenceUtil {
return mPreferences.getString(ARTIST_SORT_ORDER, SortOrder.ArtistSortOrder.ARTIST_A_Z);
}
public void setArtistSortOrder(final String sortOrder) {
final SharedPreferences.Editor editor = mPreferences.edit();
editor.putString(ARTIST_SORT_ORDER, sortOrder);
editor.apply();
}
public final String getArtistSongSortOrder() {
return mPreferences.getString(ARTIST_SONG_SORT_ORDER, SortOrder.ArtistSongSortOrder.SONG_A_Z);
}
@ -234,6 +240,12 @@ public final class PreferenceUtil {
return mPreferences.getString(ALBUM_SORT_ORDER, SortOrder.AlbumSortOrder.ALBUM_A_Z);
}
public void setAlbumSortOrder(final String sortOrder) {
final SharedPreferences.Editor editor = mPreferences.edit();
editor.putString(ALBUM_SORT_ORDER, sortOrder);
editor.apply();
}
public final String getAlbumSongSortOrder() {
return mPreferences.getString(ALBUM_SONG_SORT_ORDER, SortOrder.AlbumSongSortOrder.SONG_TRACK_LIST);
}