Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
Sorting buttons #91
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Jan 30, 2016
1 parent 17f50cb commit 025081c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/se/bjurr/prnfb/ManualResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static com.atlassian.bitbucket.permission.Permission.ADMIN;
import static com.google.common.collect.Iterables.find;
import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Ordering.usingToString;
import static java.lang.Boolean.FALSE;
import static java.lang.Boolean.TRUE;
import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
Expand Down Expand Up @@ -106,6 +107,7 @@ && triggeredByAction(clientKeyStore, settings, pullRequestAction, pullRequest, v
buttons.add(candidate);
}
}
buttons = usingToString().sortedCopy(buttons);
return ok(gson.toJson(buttons), APPLICATION_JSON).build();
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/se/bjurr/prnfb/settings/PrnfbButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ public BUTTON_VISIBILITY getVisibility() {
public String getFormIdentifier() {
return formIdentifier;
}

@Override
public String toString() {
return "Title: " + title;
}
}

0 comments on commit 025081c

Please sign in to comment.