macOS client overlays, menus and notifications
This commit is contained in:
@@ -100,6 +100,7 @@ final class Connection {
|
||||
}
|
||||
phase = .running(store)
|
||||
store.startGlobalStream(after: status.lastEventSeq)
|
||||
Notifier.shared.deliver()
|
||||
} catch {
|
||||
await store.stop()
|
||||
if gen == generation {
|
||||
@@ -186,6 +187,7 @@ struct FatalView: View {
|
||||
|
||||
struct RootView: View {
|
||||
@Environment(Connection.self) private var connection
|
||||
@Environment(\.openWindow) private var openWindow
|
||||
|
||||
var body: some View {
|
||||
Group {
|
||||
@@ -204,5 +206,13 @@ struct RootView: View {
|
||||
.foregroundStyle(Palette.text)
|
||||
.tint(Palette.accent)
|
||||
.background(Palette.bg)
|
||||
.onAppear {
|
||||
let openWindow = openWindow
|
||||
Notifier.shared.connection = connection
|
||||
Notifier.shared.showWindow = {
|
||||
openWindow(id: "main")
|
||||
}
|
||||
Notifier.shared.deliver()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user