reader pin UX: push-pin icon, toggle, left/right split
Per user feedback on the reader action bar: use the push-pin glyph (not the chain/link), make the pin button toggle the pinned state (tap to pin current, tap again to unpin) via ReaderNav.togglePin, and split the layout so the pin/unpin toggle sits on the left while jump-to-pin joins the navigator (back/forward) on the right — left toggles, right navigates. The action button gains an active (accent) state for the pinned indicator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -87,6 +87,17 @@ class ReaderNav extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
/// Toggle the pinned state: pin the current entry when nothing is
|
||||
/// pinned, otherwise clear the pin. (The reader's left-hand pin button.)
|
||||
void togglePin() {
|
||||
if (_pinnedIndex != null) {
|
||||
_pinnedIndex = null;
|
||||
notifyListeners();
|
||||
} else {
|
||||
pin();
|
||||
}
|
||||
}
|
||||
|
||||
/// Jump to the pinned entry and re-emit it. No-op when nothing is pinned.
|
||||
void jumpToPin() {
|
||||
final p = _pinnedIndex;
|
||||
|
||||
Reference in New Issue
Block a user