Refactor compression lifecycle, consolidate messages, and add no-upda… - #24
Merged
Conversation
…te window - Add `compressrNoUpdate` language key across all locales (10 languages) and wire it into the new NoUpdate window view - Replace all `Ignore*` enum variants with a single `Message::Noop` variant - Remove `current_scale` field from `Window` struct; `scale_factor` now always returns 1.0 - Remove `compression_succeeded` field from `State` — completion is now inferred from the results vector - Add `compression_aborted: Arc<AtomicBool>` to `State`; set on main window close during compression to cancel in-flight tasks - Add cancellation checks throughout `compress_single` so running operations abort promptly when the window is closed - Validate output path is an existing directory before starting compression (fail early instead of late) - Change `CompressionParams.output_path` to `Arc<str>` to share across batch items - Return `&'static str` from `get_platform()` instead of an owned `String` - Remove `Serialize` derives from `Version`/`Platform` (only deserialized) - Replace exhaustive theme match with dynamic `Theme::ALL` lookup - Add `pixel_data()` helper and use native color types in BMP/TIFF encoders - Minor cleanup: use `first()` over `[0]`, `format!` over `.to_string() +`, inline trivial variables, `fold` for totals
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.
…te window
compressrNoUpdatelanguage key across all locales (10 languages) and wire it into the new NoUpdate window viewIgnore*enum variants with a singleMessage::Noopvariantcurrent_scalefield fromWindowstruct;scale_factornow always returns 1.0compression_succeededfield fromState— completion is now inferred from the results vectorcompression_aborted: Arc<AtomicBool>toState; set on main window close during compression to cancel in-flight taskscompress_singleso running operations abort promptly when the window is closedCompressionParams.output_pathtoArc<str>to share across batch items&'static strfromget_platform()instead of an ownedStringSerializederives fromVersion/Platform(only deserialized)Theme::ALLlookuppixel_data()helper and use native color types in BMP/TIFF encodersfirst()over[0],format!over.to_string() +, inline trivial variables,foldfor totals