Conversation
合并main分支改动到dev分支
There was a problem hiding this comment.
Pull request overview
This PR updates the Flutter/Rust bridge toolchain and introduces several UX + architecture improvements across the Flutter app (mouse back navigation, unified comic export, reader preloading, history pagination).
Changes:
- Upgrade
flutter_rust_bridgeto 2.12.0 (Rust + Dart generated bindings updated accordingly). - Add a global mouse back-button listener (wired into
main.dart) with widget tests. - Refactor comic export logic into a shared
ComicExporter, add reader image-preload setting, and optimize history pagination/indexing.
Reviewed changes
Copilot reviewed 31 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/global_mouse_back_listener_test.dart | Adds widget tests verifying mouse back button triggers navigation pop and respects enable/disable. |
| rust/src/frb_generated.rs | Regenerated FRB Rust bindings for 2.12.0 (includes decode changes). |
| rust/src/api/simple.rs | Avoids unwrap() when guessing image format; returns error instead. |
| rust/Cargo.toml | Bumps flutter_rust_bridge Rust crate to 2.12.0. |
| rust/Cargo.lock | Lockfile updates for FRB 2.12.0 and related crates. |
| pubspec.yaml | App version + Flutter SDK bump; adds cached_network_image_ce; pins Dart-side FRB to 2.12.0. |
| pubspec.lock | Lockfile updates for new/updated Dart deps (including FRB 2.12.0). |
| lib/widgets/global_mouse_back_listener.dart | New widget to handle mouse back side-button globally via NavigatorState.maybePop(). |
| lib/views/settings/settings.dart | Renames a settings menu entry label (“分类屏蔽”). |
| lib/views/settings/gesture_area.dart | Removes the GestureArea settings UI (previously unused/commented routes). |
| lib/views/reader/widgets/reader_settings.dart | Adds UI to configure image preload count and applies it to the active preload controller. |
| lib/views/reader/widgets/app_bar.dart | Hides reader app bar actions during smooth scrolling. |
| lib/views/reader/utils/image_preload_controller.dart | Makes maxPreloadCount mutable so it can be adjusted at runtime. |
| lib/views/reader/reader.dart | Adds scroll-notification handling to auto-hide toolbar after scrolling threshold. |
| lib/views/reader/providers/reader_provider.dart | Adds hideToolbar() helper and initializes preload controller with AppConf preload count. |
| lib/views/mine/profile.dart | Extracts profile header UI into its own file. |
| lib/views/mine/mine.dart | Uses extracted profile + preview section widgets (reduces file size/duplication). |
| lib/views/mine/history.dart | Switches history paging to new HistoryPageResult API with hasMore logic. |
| lib/views/mine/comic_preview_section.dart | New reusable “comic preview section” + “comic item” widgets. |
| lib/views/import_comics/import_comics.dart | Replaces per-platform export implementations with unified ComicExporter. |
| lib/views/download/downloads_ui.dart | Replaces per-platform export implementations with unified ComicExporter. |
| lib/views/comic_details/header_info.dart | Adds long-press copy-to-clipboard for author/translation team rows. |
| lib/views/comic_details/comic_details.dart | Reorders description box below chapter list. |
| lib/utils/comic_exporter.dart | New unified export utility (desktop/iOS/Android) for PDF/ZIP export. |
| lib/rust/frb_generated.web.dart | Regenerated FRB Dart bindings header for 2.12.0. |
| lib/rust/frb_generated.io.dart | Regenerated FRB Dart bindings header for 2.12.0. |
| lib/rust/frb_generated.dart | Regenerated FRB entrypoint + config updates for 2.12.0 (incl. wasm bindgen name). |
| lib/rust/api/simple.dart | Regenerated FRB Dart API header for 2.12.0. |
| lib/rust/api/compress.dart | Regenerated FRB Dart API header for 2.12.0. |
| lib/main.dart | Wraps app builder with GlobalMouseBackListener, gated by auth status. |
| lib/database/history_helper.dart | Adds pagination result type, improves ordering/indexing, and updates timestamp strategy. |
| lib/config/app_config.dart | Adds persisted preloadImageCount setting. |
| .gitignore | Ignores .appdata/ and .claude/. |
| .gitattributes | Enforces LF for Flutter-generated desktop plugin registrant files to prevent Windows churn. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await exportPdf( | ||
| sourceFolderPath: sourceFolderPath, | ||
| outputPdfPath: outputPath, | ||
| ); |
Comment on lines
+139
to
+145
| ); | ||
| case ExportFileType.zip: | ||
| await compress( | ||
| sourceFolderPath: sourceFolderPath, | ||
| outputZipPath: outputPath, | ||
| compressionMethod: CompressionMethod.stored, | ||
| ); |
Comment on lines
491
to
494
| fn sse_decode(deserializer: &mut flutter_rust_bridge::for_generated::SseDeserializer) -> Self { | ||
| let mut len_ = <i32>::sse_decode(deserializer); | ||
| let mut ans_ = vec![]; | ||
| let mut ans_ = Vec::with_capacity(len_ as usize); | ||
| for idx_ in 0..len_ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.