abbb90d06ac403f4f5aa4250d9f13e2e2dfd8e1b
1
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
4c088448c3 |
feat(reader): 船新的基于 Compose 实现的阅读菜单界面与各项优化
* 初始版本 * refactor(reader): MVI architecture + menu settings overhaul MVI/UDF Architecture: - Add ReadBookContract: UiState, Intent, Effect, Sheet, Dialog, ConfigUpdate - Refactor ReadBookViewModel with onIntent() entry point - Add ReadBookScreen/ReadBookRouteScreen stateless composables - Add ReadBookColorTheme for reader-specific theme override - Add ReadConfigContract for read config screen MVI ReadStyleSheet Decomposition: - Split ReadStyleSheet into SystemMenuPage, TextTitleSheet, HeaderFooterPage, TitleBarIconSheet, GlobalThemePage - Each page owns its tab state, color picker, and config mutations Data Layer (DataStore-backed Repositories): - Add ReadSettingsRepository with ReadPreferences flow - Add MangaSettingsRepository with MangaPreferences flow - Add ReadAloudSettingsRepository for TTS settings - Add ReadStyleRepository (file I/O for read style configs) - Add ReadBookStyleConfigRepository (repository boundary) - Add ReadStyleResolver for background/theme resolution - Remove legacy ReadTipConfig (merged into ReadBookConfig) - Register all new repositories in Koin appModule Menu Settings: - Add unified border settings (width, color, colorNight) for both top and bottom bars with drawWithCache + drawPath - Add ColorModePill with light/dark toggle and '+' icon for no-color state in TinySettingItems - Add TinyClearColorModeSettingItem for border color config - Add menu color customization (bg, accent, container) with day/night variants and seed color mode - Add bottom bar layout settings (corner radius, margins) - Add custom icon support for menu buttons and title bar icons - Add title bar icon position setting Config Pipeline: - Consolidate all ReadBookConfig mutations into typed ConfigUpdate sealed interface with legacy UP_CONFIG code mapping - Add resolvedMenuBorderColor (auto day/night switching) - Add 20 new PreferKey constants for menu settings - Update manga config dialogs to use MangaSettingsRepository - Update ReadConfigViewModel with DataStore flow observation * feat(reader): add liquid glass menu bars and floating bottom bar - Integrate com.kyant.backdrop 2.0.0 for liquid glass blur/vibrancy effects on reading menu top bar and bottom bar (Android 13+) - Add floating bottom bar toggle replacing manual margin sliders - Extract ReadMenuConfig data class for proper MVI state management of all menu configuration properties - Enable edge-to-edge in BaseComposeActivity, remove manual navigation bar color management across base classes and controller - Fix fullScreen() to use setDecorFitsSystemWindows(false) * Refactor series button rendering * 实现液态玻璃 * 优化液态玻璃 * @ fix(reader): fix MVI behavior issues and improve sheet lifecycle Behavior fixes: - Fix AddSourceAsNewBook empty implementation — wire intent to addToBookshelf - Fix content edit loading stuck on null chapter/content — use onFinally - Fix cannot save empty content — remove isEmpty guard, use title as loaded proxy - Fix bookmark not opening — use openReadMenuRoute instead of dead activeSheet path - Fix chapter source sheet persists — animate dismiss via show param before removal - Fix chapter source reopens to TOC — reset showToc in initData - Fix SaveChapterContent saves to wrong chapter — carry chapterIndex in intent - Fix chapter source search runs after dismiss — cancel searchJob in dispose - Fix "go to background" button in ReadAloud — use CloseReadBook intent Architecture improvements: - ReadMenuConfig uses ImmutableMap for Compose stability - Fix stale remember in ReadBookMenuBar title bar icons - Move icon picker file IO from composable to ViewModel - Route launcher results through MVI intents instead of direct calls - Fix ChangeChapterSource effect collector key — use viewModel not Unit - Make ReadAloudConfigSheet UDF-compliant — stateless with intents - Remove main menu buttons from AutoRead and ReadAloud sheets @ * @ refactor(reader): use Material Icons and ConfirmDismissButtonsRow - TitleBarIconSheet: replace drawable resources with Icons library, use ConfirmDismissButtonsRow for save/cancel buttons - SystemMenuPage MenuCustomIconSheet: same icon and button treatment - ReadBookMenuBar: update ToolButtonDef/TitleBarIconDef to use ImageVector instead of drawable resource Int - Use AutoMirrored variants for List and HelpOutline icons @ * feat: 优化液态玻璃 * feat: 优化液态玻璃 * fix(AppLogSheet): 从本地文件读取日志,替代内存列表 * @ feat(reader): highlight rules, theme refactor & MVI improvements - Add HighlightRule entity, DAO, and config/edit sheets - Add ThemeConfigStore, remove OldThemeConfig - Refactor ReadBookContract/ViewModel/Screen for deeper MVI - Add CharStyle for text rendering, refactor TextLine/TextChapterLayout - Add SectionTitle, TinySettingItems UI components - Remove legacy XML layouts (regex_color_config) - Update database schema to v90 - Various sheet and widget refinements @ * @ fix: address PR review feedback - ReadStyleRepository: fix copy-paste bug (bgStrNight→bgStr) + add bgTypeNight import - BgImageSpan: replace Bitmap.createScaledBitmap with BitmapShader matrix scaling - HighlightRule: use UUID.randomUUID() instead of System.currentTimeMillis() - ChangeSourceSearchUseCase: guard against empty chapters list @ * @fix: remove residual regexColorRules references after merge - ChangeSourceSearchUseCase: adapt filter lambda to new 3-param signature - TextChapterLayout: remove globalRegexResult field, preApplyRegexColorRules call, and the entire regexColorRules fullTextBuilder block @ * fix: 图标间距 |