Skip to content

QuickLook preview crashing in macOS App #92

@manthan127

Description

@manthan127

Issue Description

There are two issues in the macOS app:

  1. Using .quickLookPreview causes the app to crash (QuickLook preview is triggered on tap of the eye icon).
  2. The Show in Finder action opens the image instead of revealing it in Finder.

Issue 1: QuickLook preview crash

Current behavior
.quickLookPreview($previewImageUrl) is applied inside a Table, which leads to crash when the preview is triggered.

Fix
Moved .quickLookPreview($previewImageUrl) outside of the Table view.


Issue 2: Show in Finder opens file instead of revealing it

Current behavior
Tapping Show in Finder opens the image file using the default app.

Expected behavior
The file should be revealed in Finder (selected but not opened), matching standard macOS UX.

Fix
Replaced:

NSWorkspace.shared.open(url)
NSWorkspace.shared.activateFileViewerSelecting([url])

I have implemented the changes in my forked repo.
Before opening a pull request, could you please let me know which branch I should target for the merge?

here is the file I changed:
https://github.com/manthan127/FengNiao/blob/master/App/macOS/AppView.swift

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions