Skip to content

Commit

Permalink
Revert spaces to tabs to match existing
Browse files Browse the repository at this point in the history
  • Loading branch information
Juiceman committed Jan 28, 2024
1 parent 5ac96f0 commit 26bb183
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/freenet/clients/http/DarknetConnectionsToadlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ protected class DarknetComparator extends ComparatorByStatus {

@Override
protected int customCompare(PeerNodeStatus firstNode, PeerNodeStatus secondNode, String sortBy) {
switch (sortBy) {
case "name":
return ((DarknetPeerNodeStatus) firstNode).getName().compareToIgnoreCase(((DarknetPeerNodeStatus) secondNode).getName());
case "privnote":
return ((DarknetPeerNodeStatus) firstNode).getPrivateDarknetCommentNote().compareToIgnoreCase(((DarknetPeerNodeStatus) secondNode).getPrivateDarknetCommentNote());
case "trust":
return ((DarknetPeerNodeStatus) firstNode).getTrustLevel().compareTo(((DarknetPeerNodeStatus) secondNode).getTrustLevel());
case "visibility":
int ret = ((DarknetPeerNodeStatus) firstNode).getOurVisibility().compareTo(((DarknetPeerNodeStatus) secondNode).getOurVisibility());
if (ret != 0) return ret;
return ((DarknetPeerNodeStatus) firstNode).getTheirVisibility().compareTo(((DarknetPeerNodeStatus) secondNode).getTheirVisibility());
default:
return super.customCompare(firstNode, secondNode, sortBy);
}
switch (sortBy) {
case "name":
return ((DarknetPeerNodeStatus) firstNode).getName().compareToIgnoreCase(((DarknetPeerNodeStatus) secondNode).getName());
case "privnote":
return ((DarknetPeerNodeStatus) firstNode).getPrivateDarknetCommentNote().compareToIgnoreCase(((DarknetPeerNodeStatus) secondNode).getPrivateDarknetCommentNote());
case "trust":
return ((DarknetPeerNodeStatus) firstNode).getTrustLevel().compareTo(((DarknetPeerNodeStatus) secondNode).getTrustLevel());
case "visibility":
int ret = ((DarknetPeerNodeStatus) firstNode).getOurVisibility().compareTo(((DarknetPeerNodeStatus) secondNode).getOurVisibility());
if (ret != 0) return ret;
return ((DarknetPeerNodeStatus) firstNode).getTheirVisibility().compareTo(((DarknetPeerNodeStatus) secondNode).getTheirVisibility());
default:
return super.customCompare(firstNode, secondNode, sortBy);
}
}

/** Default comparison, after taking into account status */
Expand Down

0 comments on commit 26bb183

Please sign in to comment.