fix order by release time (#265)

This commit is contained in:
CoderStory 2021-03-04 17:20:39 +08:00 committed by GitHub
parent ef7e3d07c5
commit 490aeae95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ public class RepoActivity extends ListActivity implements RepoLoader.Listener {
if (sort == 0) { if (sort == 0) {
fullList.sort((o1, o2) -> labelComparator.compare(o1.getDescription(), o2.getDescription())); fullList.sort((o1, o2) -> labelComparator.compare(o1.getDescription(), o2.getDescription()));
} else if (sort == 1) { } else if (sort == 1) {
fullList.sort(Collections.reverseOrder(Comparator.comparing(o -> Instant.parse(o.getUpdatedAt())))); fullList.sort(Collections.reverseOrder(Comparator.comparing(o -> Instant.parse(o.getReleases().get(0).getUpdatedAt()))));
} }
String queryStr = searchView != null ? searchView.getQuery().toString() : ""; String queryStr = searchView != null ? searchView.getQuery().toString() : "";
runOnUiThread(() -> getFilter().filter(queryStr)); runOnUiThread(() -> getFilter().filter(queryStr));