Order feeds case-insensitive

This commit is contained in:
Martin Fietz 2015-11-01 14:58:19 +01:00
parent c9986edc5e
commit 63094436b0
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) { } else if(feedOrder == UserPreferences.FEED_ORDER_ALPHABETICAL) {
comparator = (lhs, rhs) -> { comparator = (lhs, rhs) -> {
if(lhs.getTitle() == null) { String t1 = lhs.getTitle();
String t2 = rhs.getTitle();
if(t1 == null) {
return 1; return 1;
} else if(t2 == null) {
return -1;
} else {
return t1.toLowerCase().compareTo(t2.toLowerCase());
} }
return lhs.getTitle().compareTo(rhs.getTitle());
}; };
} else { } else {
comparator = (lhs, rhs) -> { comparator = (lhs, rhs) -> {