ReadViewSDK/Sources/RDReaderView/EPUBUI/ReaderController/RDEPUBReaderUIState.swift
shenlei ed390da147 feat: unify reader chrome state management
- Add RDEPUBReaderUIState struct for centralized UI state model
- Refactor RDEPUBReaderChromeCoordinator with makeUIState() and applyUIState()
- Remove direct UI updates from RDEPUBReaderAnnotationCoordinator
- Consolidate updateBookmarkChrome() into updateReaderChrome()
- Update RDEPUBReaderContext, Runtime, and LocationCoordinator
- Add reader problem fix development checklist documentation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 17:51:08 +08:00

39 lines
1.5 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Foundation
/// UI /
///
/// ChromeCoordinator AnnotationCoordinator
///
struct RDEPUBReaderUIState {
///
let canToggleBookmark: Bool
///
let hasBookmarkAtCurrentLocation: Bool
///
let canShowBookmarks: Bool
///
let canAddHighlight: Bool
///
let canShowHighlights: Bool
///
let showsTableOfContents: Bool
///
let allowsHighlights: Bool
///
let showsSettingsPanel: Bool
}
extension RDEPUBReaderUIState {
///
static let empty = RDEPUBReaderUIState(
canToggleBookmark: false,
hasBookmarkAtCurrentLocation: false,
canShowBookmarks: false,
canAddHighlight: false,
canShowHighlights: false,
showsTableOfContents: true,
allowsHighlights: true,
showsSettingsPanel: true
)
}