Skip to content

Commit

Permalink
Merge release/1.83.0 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daxmobile authored Apr 12, 2024
2 parents fcf8390 + 6d62571 commit 5337ee5
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 35 deletions.
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 161
CURRENT_PROJECT_VERSION = 162

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ final class NetworkProtectionAppEvents {
func applicationDidBecomeActive() {
Task { @MainActor in
await featureVisibility.disableIfUserHasNoAccess()

#if SUBSCRIPTION
await AccountManager(subscriptionAppGroup: Bundle.main.appGroup(bundle: .subs)).refreshSubscriptionAndEntitlements()
#endif
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,6 @@ final class NetworkProtectionNavBarButtonModel: NSObject, ObservableObject {
guard [.normal, .integrationTests].contains(NSApp.runType) else { return NSImage() }
#endif

if NetworkProtectionWaitlist().readyToAcceptTermsAndConditions {
return .networkProtectionAvailableButton
}

if NetworkProtectionKeychainTokenStore().isFeatureActivated {
return .image(for: icon)!
}

return .image(for: icon)!
}

Expand Down
24 changes: 24 additions & 0 deletions DuckDuckGo/Tab/View/WebView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,30 @@ final class WebView: WKWebView {
weak var contextMenuDelegate: WebViewContextMenuDelegate?
weak var interactionEventsDelegate: WebViewInteractionEventsDelegate?

private var isLoadingObserver: Any?

override func addTrackingArea(_ trackingArea: NSTrackingArea) {
/// disable mouseEntered/mouseMoved/mouseExited events passing to Web View while it‘s loading
/// see https://app.asana.com/0/1177771139624306/1206990108527681/f
if trackingArea.owner?.className == "WKMouseTrackingObserver" {
// suppress Tracking Area events while loading
isLoadingObserver = self.observe(\.isLoading, options: [.new]) { [weak self, trackingArea] _, c in
if c.newValue /* isLoading */ ?? false {
guard let self, self.trackingAreas.contains(trackingArea) else { return }
removeTrackingArea(trackingArea)
} else {
guard let self, !self.trackingAreas.contains(trackingArea) else { return }
superAddTrackingArea(trackingArea)
}
}
}
super.addTrackingArea(trackingArea)
}

private func superAddTrackingArea(_ trackingArea: NSTrackingArea) {
super.addTrackingArea(trackingArea)
}

override var isInFullScreenMode: Bool {
if #available(macOS 13.0, *) {
return self.fullscreenState != .notInFullscreen
Expand Down

0 comments on commit 5337ee5

Please sign in to comment.