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

Remove custom sort order when retrieving the list of persons related to

an event to ensure the order is the same as in persons summary text.
This commit is contained in:
Christophe Beyls 2014-01-11 01:16:18 +01:00
parent 962d15f0e3
commit cd1436fef4

View file

@ -705,7 +705,7 @@ public class DatabaseManager {
String[] selectionArgs = new String[] { String.valueOf(event.getId()) }; String[] selectionArgs = new String[] { String.valueOf(event.getId()) };
Cursor cursor = helper.getReadableDatabase().rawQuery( Cursor cursor = helper.getReadableDatabase().rawQuery(
"SELECT p.rowid AS _id, p.name" + " FROM " + DatabaseHelper.PERSONS_TABLE_NAME + " p" + " JOIN " + DatabaseHelper.EVENTS_PERSONS_TABLE_NAME "SELECT p.rowid AS _id, p.name" + " FROM " + DatabaseHelper.PERSONS_TABLE_NAME + " p" + " JOIN " + DatabaseHelper.EVENTS_PERSONS_TABLE_NAME
+ " ep ON p.rowid = ep.person_id" + " WHERE ep.event_id = ?" + " ORDER BY p.name ASC", selectionArgs); + " ep ON p.rowid = ep.person_id" + " WHERE ep.event_id = ?", selectionArgs);
try { try {
List<Person> result = new ArrayList<Person>(cursor.getCount()); List<Person> result = new ArrayList<Person>(cursor.getCount());
while (cursor.moveToNext()) { while (cursor.moveToNext()) {