Commit 3bbfa4afd1
Copy SHA
3bbfa4afd14ed7dfd0cf3d15244505b7ad421d14
parent: 262d8327a0
Verified · cmc
cmc <hello@cleberg.net> · 2026-11-25 23:56 UTC
iOS: move the notification clean-up out of App.init
The effort reminder is set, and its old request removed, after the first
frame rather than in MobileModel.init. Removing a pending notification
waits on the notification service, which held a blank screen at launch on
a freshly booted simulator.
Ref #224
Changed files (2)
Sources/OrgstarMobile/MobileModel.swift
−1 · view
@@ -101,7 +101,6 @@ final class MobileModel {
101 guard let self else { return }
101 guard let self else { return }
102 _ = self . clock . textChanged ( path , self . session )
102 _ = self . clock . textChanged ( path , self . session )
103 }
103 }
104 clock . remindAtEffort ( session )
105 // A n e w D y n a m i c T y p e s i z e r e s t y l e s e d i t o r s a n d t h e r e a d e r .
104 // A n e w D y n a m i c T y p e s i z e r e s t y l e s e d i t o r s a n d t h e r e a d e r .
106 sizeObserver = NotificationCenter . default . addObserver ( forName : UIContentSizeCategory . didChangeNotification , object : nil , queue : . main ) { [ weak self ] _ in
105 sizeObserver = NotificationCenter . default . addObserver ( forName : UIContentSizeCategory . didChangeNotification , object : nil , queue : . main ) { [ weak self ] _ in
107 MainActor . assumeIsolated { self ? . settingsVersion += 1 }
106 MainActor . assumeIsolated { self ? . settingsVersion += 1 }
Sources/OrgstarMobile/OrgstarMobileApp.swift
+6 · view
@@ -300,6 +300,12 @@ struct RootView: View {
300 takeShared ( )
300 takeShared ( )
301 }
301 }
302 }
302 }
303 // A f t e r t h e f i r s t f r a m e : r e m o v i n g a p e n d i n g n o t i f i c a t i o n w a i t s o n t h e n o t i f i c a t i o n
304 // s e r v i c e , w h i c h c a n t a k e m a n y s e c o n d s a f t e r t h e d e v i c e s t a r t s .
305 . task {
306 await Task . yield ( )
307 model . clock . remindAtEffort ( session )
308 }
303 . task {
309 . task {
304 TimerModel . shared . onDone = { message = $0 }
310 TimerModel . shared . onDone = { message = $0 }
305 takeShared ( )
311 takeShared ( )