Also stop watcher on macOS

This commit is contained in:
Thomas Ricouard 2023-02-06 17:53:47 +01:00
parent f1fd18a04f
commit b417141269

View file

@ -171,9 +171,7 @@ struct IceCubesApp: App {
private func handleScenePhase(scenePhase: ScenePhase) { private func handleScenePhase(scenePhase: ScenePhase) {
switch scenePhase { switch scenePhase {
case .background: case .background:
if !ProcessInfo.processInfo.isiOSAppOnMac { watcher.stopWatching()
watcher.stopWatching()
}
case .active: case .active:
watcher.watch(streams: [.user, .direct]) watcher.watch(streams: [.user, .direct])
UIApplication.shared.applicationIconBadgeNumber = 0 UIApplication.shared.applicationIconBadgeNumber = 0