Skip to content

Commit 7350355

Browse files
authored
Remove unnecessary async annotation in demo (#241)
1 parent dd6b109 commit 7350355

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Examples/ElizaSharedSources/AppSources/MessagingView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct MessagingView<ViewModel: MessagingViewModel>: View {
8484
.toolbar {
8585
ToolbarItem(placement: .navigationBarTrailing) {
8686
Button("End Chat") {
87-
Task { await self.viewModel.endChat() }
87+
self.viewModel.endChat()
8888
self.presentationMode.wrappedValue.dismiss()
8989
}
9090
}

Examples/ElizaSharedSources/AppSources/MessagingViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protocol MessagingViewModel: ObservableObject {
3535
func send(_ message: String) async
3636

3737
/// End the chat session (and close connections if needed).
38-
func endChat() async
38+
func endChat()
3939
}
4040

4141
/// View model that uses unary requests for messaging.
@@ -60,7 +60,7 @@ final class UnaryMessagingViewModel: MessagingViewModel {
6060
))
6161
}
6262

63-
func endChat() async {}
63+
func endChat() {}
6464
}
6565

6666
/// View model that uses bidirectional streaming for messaging.

0 commit comments

Comments
 (0)