fix(reader): share original page image from context menu - #954
Merged
Conversation
The page context menu share action (long-press on iOS, right-click on macOS) passed the displayed imageView.image, which already has rotation, split-wide crop, and border crop applied. Sharing or saving a page with border cropping enabled therefore produced the cropped image instead of the full page. Resolve the share image from ReaderViewModel.preloadedImage(for:) like the other share entry points, falling back to the displayed image only when the preloaded original is unavailable. Also remove the unused ImageSaveHelper, SaveImageStatus, and dead AppErrorType save-image cases.
everpcpc
marked this pull request as ready for review
August 20, 2026 01:03
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
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.
Summary
Fixes the page context menu (long-press on iOS, right-click on macOS) sharing the cropped image when border cropping is enabled. Saving or sharing a page from that menu now produces the full, original page, matching the other share entry points.
Root Cause
The context menu share action passed the on-screen
imageView.image, which already has rotation, split-wide crop, and border crop applied byNativePageItem's prepared-image pipeline. The toolbar share, macOS command-menu share, and page-jump sheet share all use the original decoded image instead, so behavior was inconsistent.Changes
NativePageItem_iOS/NativePageItem_macOS: resolve the share image fromReaderViewModel.preloadedImage(for:), falling back to the displayed image only when the preloaded original is unavailable.ImageSaveHelper,SaveImageStatus, and the unreferenced save-image cases inAppErrorType.Validation
make buildpasses on iOS, macOS, and tvOS.