Skip to content

Android: reader never reads persisted default reading theme (always opens DARK, in-reader changes lost on close) #428

Closed

Description

@libravault-xyz

Summary

Found while investigating iOS issue reported by tester R (TestFlight build 39, theme reverting to Sepia on a new document) — related but distinct gap on Android, not what R actually hit (since Android's hardcoded fallback is DARK, not sepia), but worth its own fix.

ReaderViewModel's ReaderUiState (feature/reader/.../ReaderViewModel.kt:48) and VaultReaderViewModel's _settings (feature/vault/.../VaultReaderViewModel.kt:69) both default to ReaderSettings() / VaultReaderSettings(), which default theme to ReadingTheme.DARK. Neither ViewModel imports or reads UserPreferencesRepository at all.

Net effect:

  • Every book opens with a hardcoded DARK theme, regardless of what's configured as the default in Settings (UserPreferencesRepository, key reading_theme).
  • Any theme change made in-reader lives only in the ViewModel's in-memory state and is lost as soon as the reader screen is closed — nothing writes back to UserPreferencesRepository.

Only MainActivity.kt:54-68 actually reads UserPreferencesRepository.defaultReadingTheme, and only to theme the outer nav host — not the reader screens themselves.

Proposed fix

Related

Activity

  1. added
    bug
    status:triage
    on Aug 22, 2026
  2. added
    status:ready-for-dev
    status:in-progress
    and removed
    status:triage
    on Aug 22, 2026
  3. libravault-xyz commented on Aug 22, 2026

    @libravault-xyz
    CollaboratorAuthor

    Automated pipeline health check: This issue's own status:ready-for-dev/status:in-progress labels are stale — its linked PR, #431, already exists and has been requeued to status:needs-qa (the dev-agent "crash" on it was a confirmed pattern-5 near-miss success, see PR #431 for details).

    Same already-flagged gap as #401/#402/#403/#386/#371/#351/#138: the triage-and-implement step's success/routing paths never revisit the originating issue's status labels once a PR is opened. Not self-healing (label cleanup on an already-advanced issue isn't in this routine's authorized action set); noting this as another instance.


    Generated by Claude Code

  4. added a commit that references this issue on Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidbugstatus:in-progressstatus:ready-for-dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions