Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Jan 21, 2021
1 parent 65f97ed commit 3aee9bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/src/mindustry/ui/dialogs/ModsDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ void setup(){
table.button(Icon.list, Styles.clearPartiali, 32f, () -> {
orderDate = !orderDate;
rebuildBrowser[0].run();
}).update(b -> b.getStyle().imageUp = (orderDate? Icon.list : Icon.star)).size(40f).get().addListener(new Tooltip(tip -> tip.label(() -> orderDate? "$mods.browser.sortdate" : "$mods.browser.sortstars").left()));
}).update(b -> b.getStyle().imageUp = (orderDate ? Icon.list : Icon.star)).size(40f).get()
.addListener(new Tooltip(tip -> tip.label(() -> orderDate ? "@mods.browser.sortdate" : "@mods.browser.sortstars").left()));
}).fillX().padBottom(4);

browser.cont.row();
Expand All @@ -194,11 +195,11 @@ void setup(){

getModList(rlistings -> {
tablebrow.clear();

Seq<ModListing> listings = rlistings;
if(!orderDate){
listings = rlistings.copy();
listings.sort((m1, m2) -> Integer.compare(m2.stars, m1.stars));
listings.sortComparing(m1 -> -m1.stars);
}

for(ModListing mod : listings){
Expand Down

0 comments on commit 3aee9bd

Please sign in to comment.