diff --git a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java index f1a18b808..d99a05976 100644 --- a/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/bookmark/BookmarkFragment.java @@ -62,8 +62,19 @@ public final class BookmarkFragment extends BaseLocalListFragment - left.getOrderingName().compareToIgnoreCase(right.getOrderingName())); + Collections.sort(items, (left, right) -> { + String on1 = left.getOrderingName(); + String on2 = right.getOrderingName(); + if (on1 == null && on2 == null) { + return 0; + } else if (on1 != null && on2 == null) { + return -1; + } else if (on1 == null && on2 != null) { + return 1; + } else { + return on1.compareToIgnoreCase(on2); + } + }); return items; }