Skip to content

Commit

Permalink
Remove unnecessary async annotation in demo (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
rebello95 authored Feb 1, 2024
1 parent dd6b109 commit 7350355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Examples/ElizaSharedSources/AppSources/MessagingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct MessagingView<ViewModel: MessagingViewModel>: View {
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("End Chat") {
Task { await self.viewModel.endChat() }
self.viewModel.endChat()
self.presentationMode.wrappedValue.dismiss()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protocol MessagingViewModel: ObservableObject {
func send(_ message: String) async

/// End the chat session (and close connections if needed).
func endChat() async
func endChat()
}

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

func endChat() async {}
func endChat() {}
}

/// View model that uses bidirectional streaming for messaging.
Expand Down

0 comments on commit 7350355

Please sign in to comment.