Skip to content

feat: paging functionality with volume buttons or tap on sides#1062

Merged
spacecowboy merged 3 commits into
spacecowboy:masterfrom
jprichter:paging-with-volume
Mar 16, 2026
Merged

feat: paging functionality with volume buttons or tap on sides#1062
spacecowboy merged 3 commits into
spacecowboy:masterfrom
jprichter:paging-with-volume

Conversation

@jprichter

Copy link
Copy Markdown
Contributor

Paging Mode for E-Ink Devices

This PR introduces a "Paging Mode" to optimize the reading experience for e-ink devices. It is added via an option in the settings of the app.

Key Features

  • Volume Key Navigation: Intercepts VOLUME_UP/DOWN to trigger page jumps.
  • Tap Zones: Adds 20% width tap targets on screen edges for devices without volume buttons.
  • E-Ink Optimization: 90% viewport jumps (10% overlap for context) with an "Animated Paging" toggle to allow for instant transitions.
  • Persistent Settings: Integrated into SettingsStore and preserved via OPML import/export.

Technical Implementation

  • Architecture: Follows the existing MVVM/Robots pattern. Uses a SharedFlow in MainActivityViewModel to broadcast scrollCommands to the ArticleScreen.

  • Navigation: Updated NavigationDestination to provide MainActivityViewModel access to the article reader safely.

  • UI/UX:

    • New "Reader Settings" toggles: Paging Mode and Animated Paging.
    • Uses articleScrollState.scrollTo for instant jumps when animations are disabled to minimize e-ink flashing.
  • Stability: Exhaustive when expressions updated; unit tests added for PagingSettings and OPML logic.

Why this approach?

Previous discussions (Issue #970 / #692) highlighted concerns regarding knowing what is off-screen. This implementation uses articleScrollState to perform relative jumps based on viewport height, ensuring a consistent 10% reading overlap regardless of content length.

@spacecowboy

Copy link
Copy Markdown
Owner

thanks for the PR @jprichter . I'll take a longer look when I have time.

But I can see that there are some CI failures (emulator tests):

com.nononsenseapps.feeder.model.opml.OPMLTest > testWrite[pixel2api30] FAILED 
        org.junit.ComparisonFailure: expected:<...r:setting key="pref_[]body_text_scale" val...> but was:<...r:setting key="pref_[paging_mode" value="true"/>

com.nononsenseapps.feeder.model.opml.OPMLTest > testRead[pixel2api30] FAILED 
        org.junit.ComparisonFailure: expected:<...r:setting key="pref_[]body_text_scale" val...> but was:<...r:setting key="pref_[paging_mode" value="true"/>

com.nononsenseapps.feeder.model.opml.OPMLTest > testReadSettings[pixel2api30] FAILED 
        org.junit.ComparisonFailure: expected:<...r:setting key="pref_[]body_text_scale" val...> but was:<...r:setting key="pref_[paging_mode" value="true"/>

com.nononsenseapps.feeder.model.opml.OPMLTest > testReadExisting[pixel2api30] FAILED 
        org.junit.ComparisonFailure: expected:<...r:setting key="pref_[]body_text_scale" val...> but was:<...r:setting key="pref_[paging_mode" value="true"/>

Please have a look at those

@spacecowboy spacecowboy self-requested a review March 13, 2026 09:32
@jprichter

Copy link
Copy Markdown
Contributor Author

@spacecowboy got the emulator test failures taken care of. There are three other ci checks failing. Can I ignore those for now?

@spacecowboy spacecowboy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@spacecowboy spacecowboy merged commit 70ed0f2 into spacecowboy:master Mar 16, 2026
9 of 12 checks passed
@spacecowboy

Copy link
Copy Markdown
Owner

fixes #970 #692

jenningsloy318 added a commit to jenningsloy318/Feeder that referenced this pull request Mar 30, 2026
Incorporate upstream changes from master (v2.17.0, v2.18.0) while
preserving all AI features developed on ai-features branch.

Upstream features incorporated:
- Paging mode with volume buttons and tap zones (spacecowboy#1062)
- Home screen widget support (spacecowboy#1018)
- Blocklist apply-to-summaries toggle (spacecowboy#1003)
- AGP 9.0.0 + OkHttp 5.3.2 upgrade (spacecowboy#1051)
- LazyColumn to Column migration for text selection crash fix (spacecowboy#1045)
- Read item opacity (spacecowboy#996)
- Bug fixes: sync deletion, compact layout scroll, network crash
- 20+ language i18n updates via Weblate

AI features preserved:
- Multi-provider AI architecture (OpenAI + Anthropic)
- Per-paragraph translation with circular progress
- Mikepenz markdown rendering for summaries
- Text selection menu customization
- Summary/translation cancellation support

Resolved 10 merge conflicts (3 HIGH, 3 MEDIUM, 4 LOW).
Deleted superseded openai/ package and LeakCanary references.
Re-indexed SettingsViewModel combine() params (35 total).
Added mainActivityViewModel parameter to all 13 navigation destinations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants