Commit 3bbfa4afd1

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

Layout: unified · split

Changed files (2)
Sources/OrgstarMobile/MobileModel.swift −1 · view
@@ -101,7 +101,6 @@ final class MobileModel {
101101 guard let self else { return }
102102 _ = self.clock.textChanged(path, self.session)
103103 }
104 clock.remindAtEffort(session)
105104 // A new Dynamic Type size restyles editors and the reader.
106105 sizeObserver = NotificationCenter.default.addObserver(forName: UIContentSizeCategory.didChangeNotification, object: nil, queue: .main) { [weak self] _ in
107106 MainActor.assumeIsolated { self?.settingsVersion += 1 }
Sources/OrgstarMobile/OrgstarMobileApp.swift +6 · view
@@ -300,6 +300,12 @@ struct RootView: View {
300300 takeShared()
301301 }
302302 }
303 // After the first frame: removing a pending notification waits on the notification
304 // service, which can take many seconds after the device starts.
305 .task {
306 await Task.yield()
307 model.clock.remindAtEffort(session)
308 }
303309 .task {
304310 TimerModel.shared.onDone = { message = $0 }
305311 takeShared()
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form