Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix opening app with ZIM doesn't open ZIM #968

Merged
merged 3 commits into from
Sep 7, 2024

Conversation

BPerlakiH
Copy link
Collaborator

Fixes: #962

As mentioned in the ticket description, the easiest way to fix this issue is to disable the non-working window restore solution on macOS.

Testing: Make sure you have only 1 version of Kiwix installed. It is possible to have multiple of them (eg from: AppStore, TestFlight, local build).
and as of Apple docs:

If multiple apps register the same scheme, the app the system targets is undefined.

meaning that the clicked ZIM file might open in another version of Kiwix, if you have more than 1 installed.

@BPerlakiH BPerlakiH added the bug label Sep 7, 2024
@BPerlakiH BPerlakiH added this to the 3.5.2 milestone Sep 7, 2024
@BPerlakiH BPerlakiH linked an issue Sep 7, 2024 that may be closed by this pull request
@kelson42
Copy link
Contributor

kelson42 commented Sep 7, 2024

@rgaudin Are you able to review/test before merging?

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 39.13%. Comparing base (28ee7db) to head (b13e466).

Files with missing lines Patch % Lines
App/App_macOS.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #968      +/-   ##
==========================================
+ Coverage   37.07%   39.13%   +2.06%     
==========================================
  Files         110      110              
  Lines        6314     6311       -3     
==========================================
+ Hits         2341     2470     +129     
+ Misses       3973     3841     -132     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rgaudin
Copy link
Member

rgaudin commented Sep 7, 2024

Tested, works like a charm: opening a ZIM if Kiwix if not open opens Kiwix with single window of said ZIM. When opening a ZIM while Kiwix is open, it add a window with said ZIM.

@kelson42
Copy link
Contributor

kelson42 commented Sep 7, 2024

We should have only one window. It ahould not open a new window, it should open a new tab in existing window.

@rgaudin
Copy link
Member

rgaudin commented Sep 7, 2024

We should have only one window. It ahould not open a new window, it should open a new tab in existing window.

This is following Apple's UI guidelines

@kelson42
Copy link
Contributor

kelson42 commented Sep 7, 2024

This multi windows is going to endlessly create problems. I will open an issue to stop this.

@kelson42 kelson42 merged commit a88669f into main Sep 7, 2024
4 checks passed
@kelson42 kelson42 deleted the 962-regression-opening-app-with-zim-doesnt-open-zim branch September 7, 2024 18:23
@rgaudin
Copy link
Member

rgaudin commented Sep 7, 2024

This multi windows is going to endlessly create problems. I will open an issue to stop this.

This is how macOS apps behave and are expected to behave. We surely can force a single window but that's at the expense of the user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REGRESSION] Opening app with ZIM doesnt open ZIM
4 participants