Skip to content

Commit

Permalink
refactor: Changed phrasing on next and previous buttons on PaginatedS…
Browse files Browse the repository at this point in the history
…electMenu
  • Loading branch information
benaclejames committed Nov 18, 2023
1 parent 23139e3 commit 25f4d5f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ public Collection<? extends LayoutComponent> build() {
// Now if we still have items left, we need to add in a forward button. And if our offset isn't 0, a back button.
List<Button> navigationButtons = new ArrayList<>();
if (offset != 0) {
navigationButtons.add(Button.danger("verifyselector_" + (this.page - 1), "Back").withEmoji(Emoji.fromUnicode("⬅")));
navigationButtons.add(Button.danger("verifyselector_" + (this.page - 1), "Previous Page")
.withEmoji(Emoji.fromUnicode("⬅")));
}

if (this.items.size() > offset + i) {
navigationButtons.add(Button.success("verifyselector_" + (this.page + 1), "Next").withEmoji(Emoji.fromUnicode("➡")));
navigationButtons.add(Button.success("verifyselector_" + (this.page + 1), "Next Page")
.withEmoji(Emoji.fromUnicode("➡")));
}

List<ActionRow> actionRows = new ArrayList<>(List.of(ActionRow.of(selectMenu.build())));
Expand Down

0 comments on commit 25f4d5f

Please # to comment.