-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Close Picture in Picture if the ZIM file is deleted/unlinked #1005
Merged
kelson42
merged 29 commits into
main
from
1003-deleting-zim-file-should-stop-playing-pip-video
Nov 1, 2024
Merged
Close Picture in Picture if the ZIM file is deleted/unlinked #1005
kelson42
merged 29 commits into
main
from
1003-deleting-zim-file-should-stop-playing-pip-video
Nov 1, 2024
Conversation
This file contains 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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1005 +/- ##
==========================================
+ Coverage 38.26% 39.02% +0.75%
==========================================
Files 118 118
Lines 6883 6949 +66
==========================================
+ Hits 2634 2712 +78
+ Misses 4249 4237 -12 ☔ View full report in Codecov by Sentry. |
BPerlakiH
force-pushed
the
1003-deleting-zim-file-should-stop-playing-pip-video
branch
from
October 18, 2024 10:20
ea30db8
to
5f67f92
Compare
BPerlakiH
force-pushed
the
1003-deleting-zim-file-should-stop-playing-pip-video
branch
from
October 19, 2024 08:36
5f67f92
to
2fc1b4f
Compare
@BPerlakiH Any news here? |
BPerlakiH
force-pushed
the
1003-deleting-zim-file-should-stop-playing-pip-video
branch
from
October 30, 2024 11:30
29e6933
to
212f19f
Compare
BPerlakiH
requested review from
rgaudin and
kelson42
and removed request for
rgaudin
October 31, 2024 21:29
This reverts commit 2fc1b4f.
This reverts commit 8e1417c16104cc118ac04c500b658a35ed021126.
This reverts commit 2fc1b4f.
kelson42
force-pushed
the
1003-deleting-zim-file-should-stop-playing-pip-video
branch
from
November 1, 2024 05:43
ae3b8f8
to
baada11
Compare
kelson42
deleted the
1003-deleting-zim-file-should-stop-playing-pip-video
branch
November 1, 2024 10:15
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.
Fixes: #1003
What has changed:
class
functions changed tostatic
. They are essentially the same, it's more of a lint issue@State var
were changed to private scope, it's also recommended (not to accidentally change it from the outside)NavigationItem
's.onBoarding
renamed to.welcomeScreen
to be inline with the name of the view where it navigates to@MainActor
(concurrency) issuesiOS:
no_tabs_issue.mov
Tabs
entities are deleted, and the cachedBrowserViewModels
are removed, which removes the relevant WKWebViews. The Picture in Picture video started from the closing tab is suspended and stoped.BrowserViewModel
. Taking the whole view out of cache and inserting into our redrawnContent
is way more quicker.MacOS
This was a harder case. Here we do not have the "illusion of tabs", we do have them in full instance named windows. In practice we can display them even side by side. From the perspective of the code: all the views and related models are duplicated (almost a full copy of the application) for each window / tab. Anything that is sent via Notification centre (eg. open url), will be sent to all windows. Solution here is to either identify who sent it, or filter the receiver. Anything that is static instance, will be shared amongst the windows / tabs.
Unfortunately SwiftUI is not giving easy access to the current window, or from the window the individual views or view models.
WKWebView
, or to clear it out completely.BrowserViewModel
caching from iOS, with a bit of extrastatic
workaround for the case when we want to open aurl
in a new window / tab. Since in this case we need to "link together" the newly created tab's id (which is also used a cache key for BrowserViewModel), and the window itself, so we know what tab id we should use in the new window (and application instance) for getting theBrowserViewModel
.Follow ups:
@Environment
, but there's no easy way to take it out from there (so far I haven't found a solution for that).