Merge branch 'sorting' of https://github.com/soren121/Phonograph into soren121-sorting

This commit is contained in:
Karim Abou Zeid 2018-04-29 22:28:16 +02:00
commit ddc74f2b4b
13 changed files with 250 additions and 8 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);
}
@ -242,6 +254,12 @@ public final class PreferenceUtil {
return mPreferences.getString(SONG_SORT_ORDER, SortOrder.SongSortOrder.SONG_A_Z);
}
public void setSongSortOrder(final String sortOrder) {
final SharedPreferences.Editor editor = mPreferences.edit();
editor.putString(SONG_SORT_ORDER, sortOrder);
editor.apply();
}
public final String getGenreSortOrder() {
return mPreferences.getString(GENRE_SORT_ORDER, SortOrder.GenreSortOrder.GENRE_A_Z);
}