Skip to content

Commit

Permalink
Move lazy var access to the MainActor (#3333)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1193060753475688/1208204608199357/f
Tech Design URL:
CC:

Description:

This PR makes a speculative fix for an lazy var access issue
  • Loading branch information
samsymons authored Sep 10, 2024
1 parent 47d7fbe commit 6f3e9bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import os.log
private let widgetRefreshModel = NetworkProtectionWidgetRefreshModel()
private let tunnelDefaults = UserDefaults.networkProtectionGroupDefaults

@MainActor
private lazy var vpnWorkaround: VPNRedditSessionWorkaround = {
return VPNRedditSessionWorkaround(
accountManager: AppDependencyProvider.shared.accountManager,
Expand Down Expand Up @@ -576,7 +577,7 @@ import os.log
}

func applicationWillResignActive(_ application: UIApplication) {
Task {
Task { @MainActor in
await refreshShortcuts()
await vpnWorkaround.removeRedditSessionWorkaround()
}
Expand Down

0 comments on commit 6f3e9bb

Please sign in to comment.