Sort folders to the end
This commit is contained in:
parent
4b7cb20a7a
commit
e86905e4c8
|
@ -891,12 +891,15 @@ public final class DBReader {
|
||||||
} else {
|
} else {
|
||||||
folder = new NavDrawerData.FolderDrawerItem(tag);
|
folder = new NavDrawerData.FolderDrawerItem(tag);
|
||||||
folders.put(tag, folder);
|
folders.put(tag, folder);
|
||||||
items.add(folder);
|
|
||||||
}
|
}
|
||||||
drawerItem.id |= folder.id;
|
drawerItem.id |= folder.id;
|
||||||
folder.children.add(drawerItem);
|
folder.children.add(drawerItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
List<NavDrawerData.FolderDrawerItem> foldersSorted = new ArrayList<>(folders.values());
|
||||||
|
Collections.sort(foldersSorted, (o1, o2) -> o1.getTitle().compareToIgnoreCase(o2.getTitle()));
|
||||||
|
items.addAll(foldersSorted);
|
||||||
|
|
||||||
NavDrawerData result = new NavDrawerData(items, queueSize, numNewItems, numDownloadedItems,
|
NavDrawerData result = new NavDrawerData(items, queueSize, numNewItems, numDownloadedItems,
|
||||||
feedCounters, UserPreferences.getEpisodeCleanupAlgorithm().getReclaimableItems());
|
feedCounters, UserPreferences.getEpisodeCleanupAlgorithm().getReclaimableItems());
|
||||||
adapter.close();
|
adapter.close();
|
||||||
|
|
Loading…
Reference in New Issue