[app] Discard modules without releases when filtering (#415)
* Or it will crash when sorted by released time.
This commit is contained in:
parent
de9db8dab3
commit
ab26c5334d
|
|
@ -179,7 +179,7 @@ public class RepoActivity extends ListActivity implements RepoLoader.Listener {
|
|||
|
||||
public void setData(Collection<OnlineModule> modules) {
|
||||
fullList = new ArrayList<>(modules);
|
||||
fullList = fullList.stream().filter((onlineModule -> !onlineModule.isHide())).collect(Collectors.toList());
|
||||
fullList = fullList.stream().filter((onlineModule -> !onlineModule.isHide() && !onlineModule.getReleases().isEmpty())).collect(Collectors.toList());
|
||||
int sort = preferences.getInt("repo_sort", 0);
|
||||
if (sort == 0) {
|
||||
fullList.sort((o1, o2) -> labelComparator.compare(o1.getDescription(), o2.getDescription()));
|
||||
|
|
|
|||
Loading…
Reference in New Issue