Skip to content

Commit d6bba20

Browse files
Remove AnalyticsManager compatibility shim
- Removed `AnalyticsManager` class from `MiddleDrag/Utilities/AnalyticsManager.swift`. - Updated `AppDelegate.swift` to use `CrashReporter` directly. - Verified removal and ensured no other usages exist.
1 parent 2d063a9 commit d6bba20

2 files changed

Lines changed: 1 addition & 21 deletions

File tree

MiddleDrag/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
1414

1515
func applicationDidFinishLaunching(_ notification: Notification) {
1616
// Initialize crash reporting only if user has opted in (offline by default)
17-
AnalyticsManager.shared.initialize()
17+
CrashReporter.shared.initializeIfEnabled()
1818

1919
Log.info("MiddleDrag starting...", category: .app)
2020

MiddleDrag/Utilities/AnalyticsManager.swift

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -238,23 +238,3 @@ final class CrashReporter {
238238
SentrySDK.addBreadcrumb(breadcrumb)
239239
}
240240
}
241-
242-
// MARK: - AnalyticsManager (Compatibility Shim)
243-
/// Maintains backward compatibility with existing code while delegating to CrashReporter
244-
/// TODO: Remove this after updating all call sites to use CrashReporter directly
245-
246-
final class AnalyticsManager {
247-
static let shared = AnalyticsManager()
248-
private init() {}
249-
250-
/// Whether crash reporting is enabled (delegates to CrashReporter)
251-
var isEnabled: Bool {
252-
get { CrashReporter.shared.isEnabled }
253-
set { CrashReporter.shared.isEnabled = newValue }
254-
}
255-
256-
/// Initialize crash reporting if user has opted in
257-
func initialize() {
258-
CrashReporter.shared.initializeIfEnabled()
259-
}
260-
}

0 commit comments

Comments
 (0)