macOS client panes and transcript
This commit is contained in:
@@ -67,7 +67,11 @@ final class Connection {
|
||||
|
||||
func changeServer() {
|
||||
generation += 1
|
||||
store?.stop()
|
||||
if let store {
|
||||
Task {
|
||||
await store.stop()
|
||||
}
|
||||
}
|
||||
connecting = false
|
||||
problem = nil
|
||||
phase = .connect
|
||||
@@ -85,9 +89,10 @@ final class Connection {
|
||||
async let lead: Void = store.loadLeadSessions()
|
||||
async let reads: Void = store.loadSummaryReads()
|
||||
_ = try await (me, projects, inbox, lead, reads)
|
||||
store.loadDrafts()
|
||||
try await store.loadFocus()
|
||||
guard gen == generation else {
|
||||
store.stop()
|
||||
await store.stop()
|
||||
return
|
||||
}
|
||||
Task {
|
||||
@@ -96,7 +101,7 @@ final class Connection {
|
||||
phase = .running(store)
|
||||
store.startGlobalStream(after: status.lastEventSeq)
|
||||
} catch {
|
||||
store.stop()
|
||||
await store.stop()
|
||||
if gen == generation {
|
||||
phase = .failed("byre failed to start: \(errorText(error))")
|
||||
}
|
||||
@@ -192,11 +197,12 @@ struct RootView: View {
|
||||
case .failed(let message):
|
||||
FatalView(message: message)
|
||||
case .running(let store):
|
||||
SpikeView()
|
||||
MainView()
|
||||
.environment(store)
|
||||
}
|
||||
}
|
||||
.foregroundStyle(Palette.text)
|
||||
.tint(Palette.accent)
|
||||
.background(Palette.bg)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user