osx: some minor fixes
This commit is contained in:
@@ -15,7 +15,7 @@ struct SplitView: View
|
||||
|
||||
private let xpcClient = XPCClient()
|
||||
private var selectedConversation: Display.Conversation? {
|
||||
guard let id = conversationListModel.selectedConversations.first else { return nil }
|
||||
guard let id = conversationListModel.selectedConversation else { return nil }
|
||||
return conversationListModel.conversations.first { $0.id == id }
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ struct SplitView: View
|
||||
ConversationView(transcriptModel: $transcriptViewModel, entryModel: $entryViewModel)
|
||||
.xpcClient(xpcClient)
|
||||
.selectedConversation(selectedConversation)
|
||||
.navigationTitle("Kordophone")
|
||||
.navigationSubtitle(selectedConversation?.displayName ?? "")
|
||||
.onChange(of: conversationListModel.selectedConversations) { oldValue, newValue in
|
||||
transcriptViewModel.displayedConversation = conversationListModel.conversations.first { $0.id == newValue.first }
|
||||
.navigationTitle(selectedConversation?.displayName ?? "Kordophone")
|
||||
.navigationSubtitle(selectedConversation?.participants.joined(separator: ", ") ?? "")
|
||||
.onChange(of: conversationListModel.selectedConversation) { oldValue, newValue in
|
||||
transcriptViewModel.displayedConversation = conversationListModel.conversations.first { $0.id == newValue }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user