Merge pull request #1321 from mfietz/issue/1319-sort-case-insensitive

Drawer: Sort feeds case-insensitive
This commit is contained in:
Tom Hennen 2015-11-01 10:49:04 -05:00
commit f53b181fe8
1 changed files with 7 additions and 2 deletions

View File

@ -950,10 +950,15 @@ public final class DBReader {
};
} else if(feedOrder == UserPreferences.FEED_ORDER_ALPHABETICAL) {
comparator = (lhs, rhs) -> {
if(lhs.getTitle() == null) {
String t1 = lhs.getTitle();
String t2 = rhs.getTitle();
if(t1 == null) {
return 1;
} else if(t2 == null) {
return -1;
} else {
return t1.toLowerCase().compareTo(t2.toLowerCase());
}
return lhs.getTitle().compareTo(rhs.getTitle());
};
} else {
comparator = (lhs, rhs) -> {