Skip to content

Commit eb42927

Browse files
github-actions[bot]claude
authored andcommitted
fix: remove leaked NotificationCenter observer in PVRootViewNavigationController
Observer was added unconditionally in _initThemeListener() but the deinit only removed it when iOS < 17.0, which is never true on our iOS 17+ target. Observer now always removed on dealloc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4d00ed5 commit eb42927

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

PVUI/Sources/PVSwiftUI/RootView/PVRootViewNavigationController.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,7 @@ public final class PVRootViewNavigationController: UINavigationController {
221221
}
222222
}
223223

224-
// Don't forget to remove the observer when it's no longer needed
225224
deinit {
226-
if #unavailable(iOS 17.0, tvOS 17.0) {
227-
NotificationCenter.default.removeObserver(self)
228-
}
225+
NotificationCenter.default.removeObserver(self)
229226
}
230227
}

0 commit comments

Comments
 (0)