Skip to content

Commit

Permalink
things I forgot to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Atomic-Laboratory committed Apr 7, 2024
1 parent c22e16d commit 87b1542
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/src/mindustry/net/ServerGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ public boolean hidden(){
return Core.settings.getBool(key() + "-hidden", false);
}

public boolean favorite(){
return Core.settings.getBool(key() + "-favorite", false);
}

public void setHidden(boolean hidden){
Core.settings.put(key() + "-hidden", hidden);
}

public void setFavorite(boolean favorite){
Core.settings.put(key() + "-favorite", favorite);
}

String key(){
return "server-" + (name.isEmpty() ? addresses.length == 0 ? "" : addresses[0] : name);
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/mindustry/ui/dialogs/JoinDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ void refreshCommunity(){

if(group.prioritized){
addHeader(groupTable, group, hidden, false);
} else if (group.favorite()) {
addHeader(groupTable, group, hidden, true);
}
//table containing all groups
for(String address : group.addresses){
Expand Down

0 comments on commit 87b1542

Please sign in to comment.