Conversation
Removes the unused `get_devices` method from the `Manager` trait and the `delete_enrolled_fingers` method and `scan_type` property from the `Device` trait in `src/fprint_dbus.rs`. These methods were not used in the codebase and their removal improves code health and declutters the interface. * src/fprint_dbus.rs: Remove unused methods.
…51104752134 Remove unused DBus proxy methods
Replaced the magic number `-1` for unknown enrollment stages with `Option<u32>` and updated `enroll_progress` to use `u32`. This improves type safety and clarity in the codebase. - Updated `Message::EnrollStart` to carry `Option<u32>`. - Updated `AppModel` to store `enroll_total_stages` as `Option<u32>` and `enroll_progress` as `u32`. - Refactored `enroll_fingerprint_process` in `src/app/fprint.rs` to safely handle `num_enroll_stages` result. - Updated UI logic to conditionally render progress bar based on `enroll_total_stages`.
…7160531604315152760 Refactor hardcoded status strings to use i18n
…955174546326378 Refactor enrollment stages to use Option<u32>
Extracted the hardcoded window minimum width and height values into named constants `WINDOW_MIN_WIDTH` and `WINDOW_MIN_HEIGHT` in `src/main.rs`. This improves code readability and maintainability by avoiding magic numbers.
This commit updates the `.github/workflows/flatpak.yml` workflow to automatically create or update a "Nightly Build" release when changes are pushed to the `main` branch. The `cosmic-fprint.flatpak` bundle is uploaded as an asset to this release. - Adds `permissions: contents: write` to the workflow to allow release creation. - Adds a `Create Release` step using `softprops/action-gh-release@v1`. - Configures the release to be a prerelease with the tag `nightly`.
feat(ci): release flatpak bundle on push to main
- Replaced string-based error mapping with `AppError` enum. - Implemented `From<zbus::Error>` for `AppError` to robustly handle DBus errors. - Added `localized_message` method to `AppError` for getting user-facing error strings. - Updated `Message::OperationError` to carry `AppError` instead of `String`. - Refactored `AppModel` and `fprint` tasks to utilize the new error handling. - Added unit tests for `AppError` localization and context handling.
…92362958801094 Refactor: Extract window size limits to constants in src/main.rs
…2075055327263659 Refactor error handling to use AppError enum
Wrapped `AppModel` fields `device_path`, `enrolling_finger` in `Arc` and updated `UserOption` to use `Arc<String>`. This optimization significantly reduces the number of deep clones (String and OwnedObjectPath) occurring during every subscription update cycle. Benchmarks showed a ~34% improvement in execution time for subscription generation logic in a tight loop. Changes: - Modified `UserOption` in `src/app/message.rs` to use `Arc<String>`. - Modified `AppModel` in `src/app/mod.rs` to use `Option<Arc<String>>` for `enrolling_finger` and `Option<Arc<OwnedObjectPath>>` for `device_path`. - Updated `init`, `update`, and `view` methods to handle the new types, ensuring deep clones only happen when necessary (e.g. passing to DBus functions). - Optimized `subscription` method to clone `Arc`s instead of deep cloning data on every update. Deep cloning is deferred to the async closure which runs only once per subscription activation.
…-16398452532923199718
…ocations-16398452532923199718 Optimize subscription generation by reducing redundant allocations
Added new version 0.3.7 with localization and optimizations.
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.