Don't try to insert a group by clause in the ActionsLoaderThread when one already exists

pull/14/head
Sam Bosley 13 years ago
parent 3ecee051eb
commit 3925306974

@ -729,7 +729,9 @@ public class TaskAdapter extends CursorAdapter implements Filterable {
public void run() {
AndroidUtilities.sleepDeep(500L);
String groupedQuery;
if (query.get().contains("ORDER BY")) //$NON-NLS-1$
if (query.get().contains("GROUP BY"))
groupedQuery = query.get();
else if (query.get().contains("ORDER BY")) //$NON-NLS-1$
groupedQuery = query.get().replace("ORDER BY", "GROUP BY " + Task.ID + " ORDER BY"); //$NON-NLS-1$
else
groupedQuery = query.get() + " GROUP BY " + Task.ID;

Loading…
Cancel
Save