fix: single page keeps custom buttons instead of dropping the view (v0.1.2)

a single-page result (max_pages < 2) suppressed the navigation row by dropping the
whole view, which also discarded the consumer's custom per-page buttons. now: if the
page carries custom buttons, keep the view and rebuild with update_buttons(nav=False)
— nav items suppressed, custom buttons kept, and stop() NOT called so their callbacks
still fire. a page with no custom buttons keeps the original drop-the-view behavior.

verified by execution against real discord.py: single page + custom button -> start()
-> callback FIRES on click (view kept, stop() not called); negative control on the old
code drops the button entirely; the no-button single-page case is unregressed.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
2026-06-29 17:26:04 -04:00
parent bca6b874c6
commit 20ea4f9291
3 changed files with 31 additions and 18 deletions
+2 -2
View File
@@ -9,13 +9,13 @@ buttons) behind previous / jump / next navigation, with an optional cache button
`requirements.txt`:
```
dpy_paginator @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_paginator.git@v0.1.1
dpy_paginator @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_paginator.git@v0.1.2
```
Direct:
```bash
pip install "dpy_paginator @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_paginator.git@v0.1.1"
pip install "dpy_paginator @ git+ssh://git@git.rethinkstudios.io/rethink-public/dpy_paginator.git@v0.1.2"
```
Requires `discord.py` (pulled transitively).