From 8bcd5303f3f118746a1f117b8a69003cdf02a9cc Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Wed, 3 Aug 2016 09:23:14 -0500 Subject: [PATCH] Sort google task lists by name --- .../com/todoroo/astrid/gtasks/GtasksFilterExposer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksFilterExposer.java b/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksFilterExposer.java index e6b73a28f..0c085f9a2 100644 --- a/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksFilterExposer.java +++ b/src/googleplay/java/com/todoroo/astrid/gtasks/GtasksFilterExposer.java @@ -10,6 +10,8 @@ import com.todoroo.astrid.api.GtasksFilter; import org.tasks.gtasks.SyncAdapterHelper; +import java.util.Collections; +import java.util.Comparator; import java.util.List; import javax.inject.Inject; @@ -44,6 +46,12 @@ public class GtasksFilterExposer { for (GtasksList list : gtasksListService.getLists()) { listFilters.add(filterFromList(list)); } + Collections.sort(listFilters, new Comparator() { + @Override + public int compare(Filter filter, Filter t1) { + return filter.listingTitle.compareTo(t1.listingTitle); + } + }); return listFilters; }