Private
Public Access
1
0

Implements signals

This commit is contained in:
2025-08-24 18:41:42 -07:00
parent 3ee94a3bea
commit b38df68eb2
6 changed files with 191 additions and 22 deletions

View File

@@ -26,9 +26,6 @@ struct KordophoneApp: App
ConversationListView(model: $conversationListModel)
.frame(minWidth: 330.0)
.xpcClient(xpcClient)
.task {
await refreshConversations()
}
} detail: {
ConversationView(transcriptModel: $transcriptViewModel, entryModel: $entryViewModel)
.xpcClient(xpcClient)
@@ -42,15 +39,6 @@ struct KordophoneApp: App
}
}
private func refreshConversations() async {
do {
let conversations = try await xpcClient.getConversations()
conversationListModel.conversations = conversations.map { Display.Conversation(from: $0) }
} catch {
reportError(error)
}
}
private func reportError(_ e: Error) {
// Just printing for now.
print("Error: \(e.localizedDescription)")