Skip to content

Commit c585b1e

Browse files
authored
fix: Remove extra unregister (#5601)
1 parent 8e3a42f commit c585b1e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Sources/Sentry/SentrySystemEventBreadcrumbs.m

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ - (void)stop
5656
[self.notificationCenterWrapper removeObserver:self
5757
name:UIDeviceOrientationDidChangeNotification
5858
object:nil];
59-
[self.notificationCenterWrapper removeObserver:self
60-
name:UIDeviceOrientationDidChangeNotification
61-
object:nil];
6259
}
6360

6461
- (void)dealloc

Tests/SentryTests/Integrations/Breadcrumbs/SentrySystemEventBreadcrumbsTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ class SentrySystemEventBreadcrumbsTest: XCTestCase {
327327
func testStopCallsSpecificRemoveObserverMethods() {
328328
sut = fixture.getSut(currentDevice: nil)
329329
sut.stop()
330-
XCTAssertEqual(fixture.notificationCenterWrapper.removeObserverWithNameAndObjectInvocations.count, 7)
330+
XCTAssertEqual(fixture.notificationCenterWrapper.removeObserverWithNameAndObjectInvocations.count, 6)
331331
}
332332

333333
private func postBatteryLevelNotification(uiDevice: UIDevice?) {

0 commit comments

Comments
 (0)