Skip to content

Commit

Permalink
disable exception message collection
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx committed Jul 23, 2024
1 parent b9f965e commit 5d92e82
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,25 +144,11 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
@UserDefaultsWrapper(key: .firstLaunchDate, defaultValue: Date.monthAgo)
static var firstLaunchDate: Date

@UserDefaultsWrapper
private var didCrashDuringCrashHandlersSetUp: Bool

static var isNewUser: Bool {
return firstLaunchDate >= Date.weekAgo
}

override init() {
// will not add crash handlers and will fire pixel on applicationDidFinishLaunching if didCrashDuringCrashHandlersSetUp == true
let didCrashDuringCrashHandlersSetUp = UserDefaultsWrapper(key: .didCrashDuringCrashHandlersSetUp, defaultValue: false)
_didCrashDuringCrashHandlersSetUp = didCrashDuringCrashHandlersSetUp
if case .normal = NSApplication.runType,
!didCrashDuringCrashHandlersSetUp.wrappedValue {

didCrashDuringCrashHandlersSetUp.wrappedValue = true
CrashLogMessageExtractor.setUp()
didCrashDuringCrashHandlersSetUp.wrappedValue = false
}

do {
let encryptionKey = NSApplication.runType.requiresEnvironment ? try keyStore.readKey() : nil
fileStore = EncryptedFileStore(encryptionKey: encryptionKey)
Expand Down Expand Up @@ -390,10 +376,6 @@ final class AppDelegate: NSObject, NSApplicationDelegate {

remoteMessagingClient?.startRefreshingRemoteMessages()

if didCrashDuringCrashHandlersSetUp {
PixelKit.fire(GeneralPixel.crashOnCrashHandlersSetUp)
didCrashDuringCrashHandlersSetUp = false
}
}

private func fireFailedCompilationsPixelIfNeeded() {
Expand Down

0 comments on commit 5d92e82

Please sign in to comment.