1
0
Fork 0
mirror of https://github.com/MatomoCamp/matomocamp-companion-android.git synced 2024-09-19 16:13:46 +02:00

Sort tracks by name in the tracks list

This commit is contained in:
Christophe Beyls 2014-01-11 01:48:54 +01:00
parent cd1436fef4
commit cff90abfec

View file

@ -348,7 +348,7 @@ public class DatabaseManager {
String[] selectionArgs = new String[] { String.valueOf(day.getIndex()) };
Cursor cursor = helper.getReadableDatabase().rawQuery(
"SELECT t.id AS _id, t.name, t.type" + " FROM " + DatabaseHelper.TRACKS_TABLE_NAME + " t" + " JOIN " + DatabaseHelper.EVENTS_TABLE_NAME
+ " e ON t.id = e.track_id" + " WHERE e.day_index = ?" + " GROUP BY t.id" + " ORDER BY t.id ASC", selectionArgs);
+ " e ON t.id = e.track_id" + " WHERE e.day_index = ?" + " GROUP BY t.id" + " ORDER BY t.name ASC", selectionArgs);
cursor.setNotificationUri(context.getContentResolver(), URI_SCHEDULE);
return cursor;
}