Skip to content

Commit

Permalink
Fix window will close notification, making sure it's from our window
Browse files Browse the repository at this point in the history
  • Loading branch information
BPerlakiH authored and kelson42 committed Aug 2, 2024
1 parent c7255f8 commit 70d6386
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion App/App_macOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,12 @@ struct RootView: View {
navigation.currentItem = .reading
browser.load(url: url)
}
.onReceive(tabCloses) { _ in
.onReceive(tabCloses) { publisher in
guard windowTracker.current == publisher.object as? NSWindow else {
// when exiting full screen video, we get the same notification
// but that's not comming from our window
return
}
guard !navigation.isTerminating else {
// tab closed by app termination
return
Expand Down

0 comments on commit 70d6386

Please sign in to comment.