Browse Source

- show unlabelled torrents at the top of filter list

pull/527/head
Twig N 4 years ago
parent
commit
3da0c25b19
  1. 6
      app/src/main/java/org/transdroid/core/gui/navigation/Label.java

6
app/src/main/java/org/transdroid/core/gui/navigation/Label.java

@ -101,13 +101,17 @@ public class Label implements SimpleListItem, NavigationFilter, Comparable<Label @@ -101,13 +101,17 @@ public class Label implements SimpleListItem, NavigationFilter, Comparable<Label
}
ArrayList<Label> localLabels = new ArrayList<>();
unnamedLabelText = unnamedLabel;
localLabels.add(new Label(unnamedLabel, -1, true));
for (org.transdroid.daemon.Label label : daemonLabels) {
if (label != null && !TextUtils.isEmpty(label.getName())) {
localLabels.add(new Label(label));
}
}
Collections.sort(localLabels);
// force unlabelled to be at the top
localLabels.add(0, new Label(unnamedLabel, -1, true));
return localLabels;
}

Loading…
Cancel
Save