mirror of
https://github.com/Andre-Bzk/rin-mobile-userscript.git
synced 2026-11-15 09:33:08 +01:00
feat: give the list view the same page navigation as the thread
The list built its own page bar from every link on the page carrying a start parameter. Topic rows bring their own "Go to page: 1 … 42, 43" along, so on the main forum that bar came to 103 entries, most of them jumping into the middle of some unrelated thread rather than to a page of the list. Even the correct entries were only the handful phpBB renders, which for 610 pages means there is no way to reach page 300. The thread already solved this: read per_page out of the page's own jumpto function, compute every target, and offer them through a fixed bar and a sheet. Both views paginate over the same parameter, so the bar, the sheet and the state behind them now sit in one place and serve both. The list leaves the bar out where a single page holds everything, which a thread of posts never does but a category page always does. Bottom clearance moved onto the bar for that reason — tied to the view, it would reserve an empty strip under lists that have no bar.
This commit is contained in:
@@ -46,13 +46,15 @@ Tampermonkey and in the iOS app; the trade-off is that Safari may clear
|
||||
script-writable storage after long inactivity, which resets the sections to
|
||||
their default.
|
||||
|
||||
The thread navigation bar holds first / previous / next / last and a page
|
||||
indicator. Tapping the indicator opens a sheet with a number field and a grid of
|
||||
all pages. Targets are computed as `start = (page - 1) × per_page` rather than
|
||||
taken from the rendered page links, because phpBB only ever shows a handful of
|
||||
them. `per_page` is read from the `jumpto()` function the forum embeds in the
|
||||
page; without it, only first page and the original previous/next links remain
|
||||
available.
|
||||
Both views share the same fixed navigation bar at the bottom: first / previous /
|
||||
next / last and a page indicator. Tapping the indicator opens a sheet with a
|
||||
number field and a grid of all pages. Targets are computed as
|
||||
`start = (page - 1) × per_page` rather than taken from the rendered page links,
|
||||
because phpBB only ever shows a handful of them. `per_page` is read from the
|
||||
`jumpto()` function the forum embeds in the page; without it, only first page
|
||||
and the original previous/next links remain available. In the list the bar is
|
||||
built only where there is more than one page — forum pages run to hundreds of
|
||||
them, category pages to one.
|
||||
|
||||
Both views carry a fixed breadcrumb bar at the top, taken from the forum's own
|
||||
`Board index » … » Main Forum` trail. Without it there is no way back out of a
|
||||
@@ -238,14 +240,15 @@ sich in Tampermonkey wie in der iOS-App gleich verhält; dafür kann Safari
|
||||
schreibbaren Speicher nach längerer Nichtnutzung räumen, dann stehen die
|
||||
Abschnitte wieder auf ihrer Voreinstellung.
|
||||
|
||||
Die Navigationsleiste im Thread enthält erste / vorherige / nächste / letzte
|
||||
Seite und eine Positionsanzeige. Ein Tipp darauf öffnet ein Sheet mit
|
||||
Zahlenfeld und einem Raster aller Seiten. Die Ziele werden als
|
||||
`start = (Seite - 1) × per_page` berechnet und nicht aus den gerenderten
|
||||
Seitenlinks übernommen, weil phpBB davon immer nur eine Handvoll anzeigt.
|
||||
`per_page` stammt aus der `jumpto()`-Funktion, die das Forum in die Seite
|
||||
einbettet; fehlt sie, bleiben nur die erste Seite und die ursprünglichen
|
||||
Zurück-/Weiter-Links nutzbar.
|
||||
Beide Ansichten teilen sich dieselbe fixierte Navigationsleiste am unteren
|
||||
Rand: erste / vorherige / nächste / letzte Seite und eine Positionsanzeige. Ein
|
||||
Tipp darauf öffnet ein Sheet mit Zahlenfeld und einem Raster aller Seiten. Die
|
||||
Ziele werden als `start = (Seite - 1) × per_page` berechnet und nicht aus den
|
||||
gerenderten Seitenlinks übernommen, weil phpBB davon immer nur eine Handvoll
|
||||
anzeigt. `per_page` stammt aus der `jumpto()`-Funktion, die das Forum in die
|
||||
Seite einbettet; fehlt sie, bleiben nur die erste Seite und die ursprünglichen
|
||||
Zurück-/Weiter-Links nutzbar. In der Liste entsteht die Leiste nur, wo es mehr
|
||||
als eine Seite gibt — Forenseiten haben hunderte, Kategorieseiten eine.
|
||||
|
||||
Beide Ansichten haben oben eine fixierte Brotkrumenleiste, übernommen aus dem
|
||||
`Board index » … » Main Forum`-Pfad des Forums. Ohne sie führt aus einem Thread
|
||||
|
||||
Reference in New Issue
Block a user