We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13d706e commit bcb192dCopy full SHA for bcb192d
application/src/main/java/org/togetherjava/tjbot/features/reminder/ReminderCommand.java
@@ -219,6 +219,7 @@ private MessageCreateData createPendingRemindersPage(
219
List<PendingRemindersRecord> pendingReminders, int pageToShow) {
220
// 12 reminders, 10 per page, ceil(12 / 10) = 2
221
int totalPages = Math.ceilDiv(pendingReminders.size(), REMINDERS_PER_PAGE);
222
+ totalPages = Math.max(1, totalPages);
223
224
pageToShow = Math.clamp(pageToShow, 1, totalPages);
225
0 commit comments