Repository navigation
fix(ios): resolve ReadingTheme to ConcreteReadingTheme in block-model call sites - #390
Conversation
… call sites dev is currently broken for every iOS build: #374 ("System" reading theme) and #369 (EPUB block-model rendering) each touched ReaderView.swift independently, merged with no git conflict, but broke Swift's type checker together. #369's two MarkdownBlockView(...) call sites (paginated + scrolling content) pass the raw `readingTheme: ReadingTheme` state (which can be .system) where MarkdownBlockView expects the already- resolved `ConcreteReadingTheme` — exactly the case #374's own effectiveReadingTheme computed property exists to handle, and which the third call site (markdownContent, line 737) already uses correctly. ReaderView.swift:544: error: cannot convert value of type 'ReadingTheme' to expected argument type 'ConcreteReadingTheme' ReaderView.swift:641: same error Fix: use effectiveReadingTheme (already resolved for the environment color scheme) at both sites, matching the third call site. No local Xcode to compile-check against — verifying via CI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This PR was opened outside the automated pipeline (author isn't |
📱 iOS Build Status: PASSED✅ iOS Simulator Build & Unit Tests - success iOS UI tests run in a separate, informational job and are not reflected above — check "iOS UI Tests (informational)" for those. |
Principal review: auto-mergeVerified directly, not just read the diff/description:
No CONFIRMED findings. |
Summary
devis currently broken for every iOS build. Found while trying to get a clean CI run on the unrelated #389 (CircleCI config only) and confirmed it's pre-existing ondev, not caused by that PR.#374 ("System" reading theme) and #369 (EPUB block-model rendering) each touched
ReaderView.swiftindependently — merged with no git conflict, but broke Swift's type checker together:#369's two
MarkdownBlockView(...)call sites (paginated content + scrolling content) pass the rawreadingTheme: ReadingThemestate (which can be.system) whereMarkdownBlockViewexpects the already-resolvedConcreteReadingTheme. #374 introducedeffectiveReadingTheme(readingTheme.resolved(for: systemColorScheme)) for exactly this, and the third call site (markdownContent, line 737) already uses it correctly — the two new ones from #369 just didn't get updated to match.Fix
Use
effectiveReadingThemeat both sites, matching the existing third call site. Two-line change, no behavior change beyond making.systemactually resolve instead of failing to compile.Testing
No local Xcode available to compile-check — relying on
Build & Test iOS (Simulator)CI, which is what caught this in the first place.🤖 Generated with Claude Code