Commit Graph
100 Commits
Author SHA1 Message Date
HapeLee 62875c54d9 fix: 书签问题与高亮规则代码优化 2026-06-10 02:44:07 +08:00
HapeLee 6749faf6eb fix: 主页面卡顿问题 2026-06-10 01:45:32 +08:00
HapeLee 43d5f6d5e2 fix: 漫画偏好设置问题 2026-06-10 01:45:32 +08:00
HapeLee 7bf9dfa09b fix: 自动跳转最近阅读 2026-06-10 01:45:32 +08:00
HapeLee eef1f58f26 fix: 高亮规则增加更多配置 2026-06-10 01:45:32 +08:00
HapeLee b27f068525 fix: 电量显示 2026-06-10 01:01:15 +08:00
HapeLee 38bbe6f3ff fix: 阅读时换源与并发数量 2026-06-10 00:42:01 +08:00
HapeLee 7b9a5dca16 fix: 章节点击事件 2026-06-10 00:42:00 +08:00
HapeLee 1c3ea16043 fix: 探索页网格数量不保存问题 2026-06-10 00:42:00 +08:00
HapeLee 1d47e29a18 fix: 朗读引擎长按事件与选择事件 2026-06-10 00:42:00 +08:00
HapeLee 92614c2ca6 fix: View与Compose亮暗色主题冷启动不一致 2026-06-09 13:26:52 +08:00
HapeLee 88dd01e0be fix: 阅读界面屏幕方向设置无效 2026-06-09 13:08:05 +08:00
HapeLee b731d201c1 fix: 阅读界面电量显示 2026-06-09 13:08:05 +08:00
HapeLee 0adb3a1484 fix: WebDAV配置来源统一 2026-06-09 13:08:05 +08:00
HapeLee 264f93389a fix: 封面设置来源统一 2026-06-09 13:07:55 +08:00
HapeLee 18dd340de1 fix: 喵喵喵 2026-06-09 02:52:18 +08:00
HapeLee e28be0301b fix: 朗读相关 2026-06-09 02:48:12 +08:00
HapeLee f00da95724 fix: 点击区域样式 2026-06-09 02:13:27 +08:00
HapeLee 295a219760 fix: 阅读菜单书源名称点击事件 2026-06-09 01:45:45 +08:00
HapeLee 25f6eeaf48 fix: 翻页开关 2026-06-09 01:17:10 +08:00
HapeLee f9fb720ae3 fix: 底栏显隐开关 2026-06-09 01:02:14 +08:00
HapeLee 9a53f9eaf4 fix: 电量显示卡住及阅读记录丢失 2026-06-09 00:45:14 +08:00
HapeLee d0be59f607 fix: 阅读背景问题 2026-06-09 00:16:36 +08:00
HapeLee 43fc1e8614 fix: prefDelegate 直接读DataStore值 2026-06-08 22:22:10 +08:00
HapeLee 8d12e03113 fix: 配置无响应问题 2026-06-08 13:51:30 +08:00
HapeLee 5db49a101c fix: 阅读界面日夜选项 2026-06-08 13:51:30 +08:00
HapeLee 51d5efbc2b fix: dataStore逻辑 2026-06-08 13:51:18 +08:00
HapeLee 99b6635f04 fix: dataStore逻辑 2026-06-08 13:51:12 +08:00
HapeLee dced1d364d refactor: AppConfig.themeMode 改为直接读取 ThemeConfig.themeMode
删除 AppConfig.themeMode 缓存变量,isNightTheme 和 JsExtensions
统一从 ThemeConfig.themeMode(prefDelegate / MutableState)读取,
消除 SP listener 异步同步的时序问题。
2026-06-08 13:51:12 +08:00
HapeLee 2ba5f98db9 fix: dataStore逻辑 2026-06-08 13:51:12 +08:00
HapeLee bdc0424073 fix: 阅读界面切换亮暗色后 View 层立即生效
toggleDayNight() 设置 ThemeConfig.themeMode 后,同步更新
AppConfig.themeMode 缓存变量,避免 View 层通过 ReadStyleResolver
读取时因 SP listener 异步回调而拿到旧值。
2026-06-08 13:51:12 +08:00
HapeLee 26d9c8ae84 fix: dataStore逻辑 2026-06-08 13:51:12 +08:00
HapeLee e5c6643da8 fix: 修复阅读界面切换亮暗色主题无效的问题 2026-06-08 13:51:12 +08:00
HapeLee 9189b3dcfc fix: dataStore逻辑 2026-06-08 13:51:11 +08:00
HapeLee b0cb83fcce feat: 更新readme与群组 2026-06-08 02:37:59 +08:00
HapeLee 02569c9b4e feat: 更新readme与群组 2026-06-08 02:18:30 +08:00
HapeLee 2d4372f968 refactor: SP/DS 统一迁移 — PrefDelegate 双写 + DS 观察者 + 备份从 DS 读取
Phase 1: PrefDelegate.setValue 写入 SP 后异步同步到 DataStore (DsSync)
Phase 2: PrefDelegate.init 启动 DS 观察者,以 DS 为读取权威源,含类型回退
Phase 3: SettingsRepository 移除 syncToSharedPrefs,DS 为唯一写入源
Phase 4: Backup.kt 从 DataStore 读取配置(替代 defaultSharedPreferences)

修复:
- postMigrationSync 读取 DS String key 时 ClassCastException (runCatching)
- DS 观察者类型回退: typed key 读不到时从 stringPreferencesKey 转换
- DS 观察者安全读取: runCatching 避免类型不匹配崩溃
2026-06-08 01:21:50 +08:00
HapeLee 3647ee7979 fix: 朗读配置面板无法标识当前引擎及切换引擎后状态不一致 2026-06-08 01:19:47 +08:00
HapeLee 40cb04dfab fix: 修复 BgTextConfigSheet 中 Color.parseColor 崩溃问题
当 bgStr/bgStrNight 为空字符串或非法颜色值时,toColorInt() 会抛出
IllegalArgumentException: Unknown color。使用 runCatching 包裹并提供
合理的默认值(日间 #EEEEEE,夜间 #000000)。
2026-06-08 00:28:23 +08:00
HapeLee 4cc04b20d5 fix: DataStore迁移后主题配置丢失导致composeEngine重置
postMigrationSync()在App启动时校验SP中的主题key,若缺失则从DataStore补回。
解决进入ReadBookScreen触发首次DS访问后,composeEngine等配置被重置的问题。
2026-06-08 00:21:46 +08:00
Kudomaga 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: 图标间距
2026-06-07 18:28:33 +08:00
HapeLee 116762f826 fix: 优化搜素逻辑 2026-06-07 01:09:24 +08:00
HapeLee adc7738627 fix: 部分发现项无法同行显示 2026-06-07 01:09:24 +08:00
HapeLee e592fcdebf fix: 不再使用脆弱的反射进行备份与恢复 2026-06-06 13:40:57 +08:00
HapeLee b1ef0098d4 Merge branch 'main' of https://github.com/HapeLee/legado-with-MD3 2026-06-06 03:08:54 +08:00
Kudomaga c5fcaa985f Merge pull request #1292 from woruteyqi/fix/cross-paragraph-regex
支持regex全文匹配
2026-06-06 03:08:28 +08:00
HapeLee 63daf5d842 fix: use null-safe access for matcher.group(1) in fullTextBuilder
Prevents potential NPE when imgPattern matches but group(1) is null.
2026-06-06 02:59:29 +08:00
HapeLee 74618447cd fix: 发现页首页筛选问题 2026-06-06 01:53:00 +08:00
HapeLee 8633dd775f fix: 多张封面导入问题 2026-06-06 01:41:26 +08:00
HapeLee 451f2f8875 feat: 更新Ktor版本 2026-06-06 01:28:43 +08:00
HapeLee 1021e1086f fix: WebService 启动崩溃与关闭卡顿 2026-06-06 01:28:20 +08:00
HapeLee e6dcc7229f fix: 源变量无法设置的问题 2026-06-04 00:59:30 +08:00
HapeLee 429667d74a Merge branch 'main' of https://github.com/HapeLee/legado-with-MD3 2026-06-02 18:32:40 +08:00
HapeLee 20731b31e6 ci: 修复build-apk-for-user - 移除阿里云镜像 + 禁用configuration-cache 2026-06-01 01:17:20 +08:00
HapeLee c8f77d015f ci: 修复Auto Release构建 - JDK 21 + 移除阿里云镜像 + 禁用configuration-cache
- JDK 17 → 21,匹配项目jvmToolchain(21)要求
- CI环境阿里镜像不稳定,构建前移除
- 禁用configuration-cache避免序列化错误
2026-06-01 01:17:03 +08:00
HapeLee c4d7bcfac7 ci: 修复CodeQL构建失败 - 移除阿里云镜像并禁用configuration-cache
- CI环境中阿里云镜像不稳定(502 Bad Gateway),构建前用sed移除
- 添加--no-configuration-cache避免序列化错误
2026-06-01 01:15:13 +08:00
HapeLee aa9e5a4458 ci: 添加自定义CodeQL工作流 - 使用JDK 21手动构建
CodeQL默认自动构建使用JDK 17,但项目jvmToolchain要求JDK 21导致构建失败。
改为manual模式,显式setup-java 21并用gradlew assembleAppDebug构建。
2026-06-01 01:01:07 +08:00
HapeLee 23b6c2e5a3 fix: 修复CI构建失败 - 调整插件仓库顺序并恢复foojay-resolver
- pluginManagement中将gradlePluginPortal()/mavenCentral()移至阿里云镜像之前,
  防止镜像缺少de.undercouch.download插件导致构建失败
- 恢复被PR #1251误删的foojay-resolver-convention插件,
  项目使用jvmToolchain(21)需要此插件自动下载匹配JDK
2026-06-01 00:44:10 +08:00
HapeLee b6b671ef7f Merge branch 'main' of https://github.com/HapeLee/legado-with-MD3 2026-06-01 00:35:04 +08:00
Kudomaga af5f53c6a4 Merge pull request #1251 from fjsuta/trae/solo-agent-vhkVM3
feat: 检查WebDav备份无响应问题
2026-06-01 00:33:51 +08:00
Kudomaga 2f7b5e16df Merge pull request #1249 from Isilsolme/fix/language-preference-apply-to-commit
Fix language preference not persisting after app restart
2026-06-01 00:33:41 +08:00
HapeLee decdc9709c chore: add AGENTS.md and .agents/ for Codex agent configuration 2026-06-01 00:33:27 +08:00
HapeLee 6cc229d9b9 @
revert: 回退rhino版本至1.8.1,移除1.9.1适配代码

- rhino 1.9.1 → 1.8.1
- VMBridgeReflect: 移除Context/ContextFactory fallback,恢复VMBridge反射
- ReadOnlyJavaObject/NativeBaseSource: 移除TypeInfoFactory适配,恢复Class<*>?构造
@
2026-05-31 22:03:33 +08:00
HapeLee c63cf8921d 备份问题 2026-05-31 01:25:28 +08:00
HapeLee f0fe3875ab 书籍管理界面不显示音频类 2026-05-31 01:25:26 +08:00
HapeLee f8f19f7379 备份问题 2026-05-30 01:16:23 +08:00
HapeLee b408ba580a fix: restore backup JobCancellationException on Activity relaunch
Move restore coroutine from rememberCoroutineScope() to viewModelScope
so it survives Activity recreation during config changes.
2026-05-29 22:53:57 +08:00
HapeLee 288ffc2137 默认主页增加首页 2026-05-29 01:33:38 +08:00
HapeLee a512ad0b4a 一些界面优化 2026-05-29 01:27:56 +08:00
HapeLee 562af402d9 书架管理返回问题 2026-05-29 01:10:04 +08:00
HapeLee afee7886b1 主题管理字体颜色问题 2026-05-29 01:06:29 +08:00
HapeLee d350f7fcb3 优化 2026-05-29 01:06:00 +08:00
HapeLee 4c0a2256c2 修复源变量会被首页模块变量覆盖的问题 2026-05-29 01:02:17 +08:00
HapeLee c641ce5d44 修复反射修改 mPreferencesDir 未恢复导致备份恢复后设置丢失的问题 2026-05-29 01:02:17 +08:00
HapeLee 7f8b2c205b 修复订阅规则的崩溃问题 2026-05-29 01:02:16 +08:00
HapeLee 9742171bf2 优化发现刷新逻辑 2026-05-28 22:26:32 +08:00
HapeLee 2896b47dc6 修复书架页筛选失效和图标错位问题 2026-05-28 19:04:27 +08:00
HapeLee d2f14b05f2 修复 ExploreShowScreen 加载时出现两个加载指示器的问题 2026-05-28 18:54:29 +08:00
HapeLee 68c16cbc5a 优化 2026-05-28 00:15:01 +08:00
HapeLee 02dca3edc1 优化 2026-05-27 23:52:27 +08:00
HapeLee 6278f26839 搜索页:精准搜索从SettingsSheet移至topbar,移除搜索类型列表水平padding 2026-05-27 21:23:58 +08:00
HapeLee d3d107a4f8 首页骨架屏:替换占位提示为EmptyMessage,模块加载骨架屏及状态切换动画 2026-05-27 19:30:47 +08:00
HapeLee 134118011a 修复 2026-05-27 02:00:23 +08:00
HapeLee dccee3b210 fix: add docs/package-lock.json for VitePress CI build
The root .gitignore had a blanket `package-lock.json` rule that prevented
the docs lock file from being committed. Change it to `/package-lock.json`
(root-only) and commit the generated lock file so `npm ci` and
setup-node cache work in the docs workflow.
2026-05-27 01:23:00 +08:00
HapeLee 4a9d655d20 文档 2026-05-27 01:15:34 +08:00
Kudomaga 9e4139059c Merge pull request #1207 from journey-ad/feature/private-group
新增隐私分组功能
2026-05-27 01:10:58 +08:00
HapeLee 6a6a0c837f Merge origin/main into feature/private-group
Resolve conflict in BookInfoSheets.kt: keep MediumPlainButton style from main
while preserving showAddGroup logic from PR for correct new group creation.
2026-05-27 01:10:06 +08:00
HapeLee 30fe70ffae 一些神必优化 2026-05-27 01:00:58 +08:00
HapeLee df2aaff0e2 增加搜素分源布局 2026-05-27 01:00:58 +08:00
HapeLee e95665b8a0 优化 2026-05-27 01:00:58 +08:00
HapeLee b7826b54a7 新增项目详情与开发文档网页 2026-05-27 01:00:58 +08:00
HapeLee 65d5c84b56 字典无法导出的问题 2026-05-27 01:00:58 +08:00
Kudomagaandduanhl db5b18ca3c feature/bookinfo-related-books (#1201)
* feature: add translation full content

* feature: add translation full content

* feature: add translation full content

* feature: add translation full content

* feature: add translation full content

* feature:use chunk files replace chunk cache db

* feature:use chunk files replace chunk cache db

* feature:use chunk files replace chunk cache db

* feature: add translation config navigation and refactor translation settings

* feature: 体验优化

* feature: fixed error prompt

* Fix Gson deserialization error for LLM translation classes under R8 obfuscation

* Fix PMD error

* feature: pre-translation

* feature: pre-translation

* 优化

* 优化

* 增加书籍详情页关联书籍推荐功能

* 修复关联书籍"更多"按钮URL模板变量未解析的问题

* 修复发现按钮部分不执行JS的问题

* 优化书籍详情封面长按逻辑

* 阅读界面自定义图标问题

* R8反混淆问题

* 主题保存时保存图片等资源

* 在首页、发现页等长按时,提供了一个查看简短书籍信息的界面与右上角书籍信息角标。现在书籍信息角标在封面设置中显示

* 现在可配置主页图标

* 主页模块配置被遮挡的问题

* 一些优化

* fix: address code review findings (null safety, error propagation, performance)

- TranslateChapterUseCase: wrap execute() in try-catch to prevent task
  stuck in Translating state; propagate actual translation error instead
  of generic "Translation incomplete"; defensive null check on pairs
- DictionaryRepositoryImpl: safe call on pairs for Gson null-bypass
- LlmTranslateRepositoryImpl: safe calls on json.sentences and
  json.choices to prevent NPE from unexpected API responses
- ContentChunker: normalize \r\n to \n before splitting paragraphs
  to handle Windows-formatted text files
- BookInfoViewModel: parallelize related books loading with async/awaitAll
- CoilBookCover: add finalPath as remember key to reset state on reuse
- ThemeImportExport: fallback to filesDir when getExternalFilesDir is null

---------

Co-authored-by: duanhl <duanhl7749@gmail.com>
2026-05-26 01:45:04 +08:00
HapeLee c6cf239d49 增加网格模式封面大小自定义 2026-05-24 02:42:13 +08:00
HapeLee 7b32cb732f 修复一些问题 2026-05-24 02:39:59 +08:00
HapeLee 5b59b5a743 修复发现页书源互相污染的问题 2026-05-24 01:16:08 +08:00
HapeLee d2853244be 优化 2026-05-23 15:39:49 +08:00
HapeLee be2041c7da 优化 2026-05-23 14:36:47 +08:00
Kudomaga 5fa4196521 触发一下自动构建 2026-05-23 04:53:24 +08:00
Kudomaga fd7ffa2526 Merge pull request #1150 from HapeLee/feature/homepage-modules
Feature/homepage modules
2026-05-23 04:08:14 +08:00