Skip to content

Commit

Permalink
Remove unused pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklyp committed Dec 20, 2024
1 parent d5663f3 commit f733e5b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 18 deletions.
10 changes: 0 additions & 10 deletions Core/Pixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,6 @@ public struct PixelParameters {

public static let appState = "state"
public static let appEvent = "event"

public static let firstBackgroundTimestamp = "firstBackgroundTimestamp"
public static let secondBackgroundTimestamp = "secondBackgroundTimestamp"
public static let didReceiveMemoryWarningTimestamp = "didReceiveMemoryWarningTimestamp"
public static let didReceiveMXPayloadTimestamp = "didReceiveMXPayloadTimestamp"
public static let didReceiveUNNotification = "didReceiveUNNotification"
public static let didStartRemoteMessagingClientBackgroundTask = "didStartRemoteMessagingClientBackgroundTask"
public static let didStartAppConfigurationFetchBackgroundTask = "didStartAppConfigurationFetchBackgroundTask"
public static let didPerformFetchTimestamp = "didPerformFetchTimestamp"
public static let numberOfBackgrounds = "numberOfBackgrounds"
}

public struct PixelValues {
Expand Down
2 changes: 0 additions & 2 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,6 @@ extension Pixel {

// MARK: Lifecycle
case appDidTransitionToUnexpectedState
case appDidConsecutivelyBackground
}

}
Expand Down Expand Up @@ -1892,7 +1891,6 @@ extension Pixel.Event {

// MARK: Lifecycle
case .appDidTransitionToUnexpectedState: return "m_debug_app-did-transition-to-unexpected-state-2"
case .appDidConsecutivelyBackground: return "m_debug_app-did-consecutively-background"

}
}
Expand Down
3 changes: 0 additions & 3 deletions DuckDuckGo/AppConfigurationFetch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class AppConfigurationFetch {
return Date().timeIntervalSince(Self.lastConfigurationRefreshDate) > Constants.minimumConfigurationRefreshInterval
}

static var didStartBackgroundTaskTimestamp: Date?

enum BackgroundRefreshCompletionStatus {

case expired
Expand Down Expand Up @@ -134,7 +132,6 @@ class AppConfigurationFetch {

static func registerBackgroundRefreshTaskHandler() {
BGTaskScheduler.shared.register(forTaskWithIdentifier: Constants.backgroundProcessingTaskIdentifier, using: nil) { (task) in
didStartBackgroundTaskTimestamp = Date()
guard shouldRefresh else {
task.setTaskCompleted(success: true)
scheduleBackgroundRefreshTask()
Expand Down
3 changes: 0 additions & 3 deletions DuckDuckGo/RemoteMessagingClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ final class RemoteMessagingClient: RemoteMessagingProcessing {
let store: RemoteMessagingStoring
let remoteMessagingAvailabilityProvider: RemoteMessagingAvailabilityProviding

var didStartBackgroundTaskTimestamp: Date?

convenience init(
bookmarksDatabase: CoreDataDatabase,
appSettings: AppSettings,
Expand Down Expand Up @@ -116,7 +114,6 @@ extension RemoteMessagingClient {
let store = store

BGTaskScheduler.shared.register(forTaskWithIdentifier: Constants.backgroundRefreshTaskIdentifier, using: nil) { [weak self] task in
self?.didStartBackgroundTaskTimestamp = Date()
guard Self.shouldRefresh else {
task.setTaskCompleted(success: true)
Self.scheduleBackgroundRefreshTask()
Expand Down

0 comments on commit f733e5b

Please sign in to comment.