Skip to content

Commit

Permalink
Remove singleton.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Aug 1, 2024
1 parent 79c0117 commit 6b9e09a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ import WebKit
await vpnWorkaround.installRedditSessionWorkaround()

if #available(iOS 17.0, *) {
await VPNSnoozeLiveActivityManager.shared.endSnoozeActivityIfNecessary()
await VPNSnoozeLiveActivityManager().endSnoozeActivityIfNecessary()
}
}

Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/NetworkProtectionStatusViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ final class NetworkProtectionStatusViewModel: ObservableObject {
try? await activeSession.sendProviderMessage(.startSnooze(defaultDuration))

if #available(iOS 17.0, *) {
await VPNSnoozeLiveActivityManager.shared.start(endDate: Date().addingTimeInterval(defaultDuration))
await VPNSnoozeLiveActivityManager().start(endDate: Date().addingTimeInterval(defaultDuration))
}
}

Expand All @@ -464,7 +464,7 @@ final class NetworkProtectionStatusViewModel: ObservableObject {
try? await activeSession.sendProviderMessage(.cancelSnooze)

if #available(iOS 17.0, *) {
await VPNSnoozeLiveActivityManager.shared.endSnoozeActivity()
await VPNSnoozeLiveActivityManager().endSnoozeActivity()
}
}

Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/VPNSnoozeLiveActivityManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import NetworkProtection

@available(iOS 17.0, *)
final class VPNSnoozeLiveActivityManager: ObservableObject {
static let shared = VPNSnoozeLiveActivityManager() // TODO: Remove singleton

private let snoozeTimingStore: NetworkProtectionSnoozeTimingStore

Expand Down

0 comments on commit 6b9e09a

Please sign in to comment.