Skip to content

Commit

Permalink
Change sort order to _lowercase_ title
Browse files Browse the repository at this point in the history
  • Loading branch information
flackbash committed Dec 27, 2018
1 parent b9716b3 commit aed80b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {

String sel = AnchorContract.AudioEntry.COLUMN_ALBUM + "=?";
String[] selArgs = {Long.toString(mAlbumId)};
String sortOrder = AnchorContract.AudioEntry.COLUMN_TITLE + " ASC";
String sortOrder = "LOWER(" + AnchorContract.AudioEntry.COLUMN_TITLE + ") ASC";

return new CursorLoader(this, AnchorContract.AudioEntry.CONTENT_URI, projection, sel, selArgs, sortOrder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public Loader<Cursor> onCreateLoader(int i, Bundle bundle) {
AnchorContract.AlbumEntry.COLUMN_TITLE,
AnchorContract.AlbumEntry.COLUMN_COVER_PATH};

String sortOrder = AnchorContract.AlbumEntry.COLUMN_TITLE + " ASC";
String sortOrder = "LOWER(" +AnchorContract.AlbumEntry.COLUMN_TITLE + ") ASC";

return new CursorLoader(this, AnchorContract.AlbumEntry.CONTENT_URI, projection, null, null, sortOrder);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private void pauseAudio() {

private void storeAudioFiles() {
//Store Serializable audioList to SharedPreferences
String sortOrder = AnchorContract.AudioEntry.COLUMN_TITLE + " ASC";
String sortOrder = "LOWER(" + AnchorContract.AudioEntry.COLUMN_TITLE + ") ASC";
ArrayList<AudioFile> audioList = AudioFile.getAllAudioFilesFromAlbum(this, mAlbumId, sortOrder);
int audioIndex = AudioFile.getIndex(audioList, mAudioFile.getId());
StorageUtil storage = new StorageUtil(getApplicationContext());
Expand Down

0 comments on commit aed80b4

Please sign in to comment.