Skip to content

fix(reader): share original page image from context menu - #954

Merged
everpcpc merged 2 commits into
mainfrom
fix/share-uncropped-page-image
Aug 20, 2026
Merged

fix(reader): share original page image from context menu#954
everpcpc merged 2 commits into
mainfrom
fix/share-uncropped-page-image

Conversation

@everpcpc

Copy link
Copy Markdown
Owner

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 by NativePageItem'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 from ReaderViewModel.preloadedImage(for:), falling back to the displayed image only when the preloaded original is unavailable.
  • Removed dead code: unused ImageSaveHelper, SaveImageStatus, and the unreferenced save-image cases in AppErrorType.

Validation

  • make build passes on iOS, macOS, and tvOS.

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
everpcpc marked this pull request as ready for review August 20, 2026 01:03
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@everpcpc
everpcpc merged commit a90f97b into main Aug 20, 2026
3 checks passed
@everpcpc
everpcpc deleted the fix/share-uncropped-page-image branch August 20, 2026 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant