-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to indicate other user is typing with a (...) message? #90
Comments
Hey @jkanalakis, unfortunately we do not have time for open source right now. You are most welcome to support this library by submitting a PR adding this functionality |
@f3dm76 Thank you, Alisa. I completely understand. I am a big fan of the ExyteChat library and all of the open source work that your team has done. |
Hello, I think you can use struct ContentView: View {
@StateObject var viewModel = ChatViewModel()
var body: some View {
NavigationStack {
VStack {
ChatView(messages: viewModel.messages) { draft in
viewModel.send(draft: draft)
}
.setAvailableInput(.textOnly)
.betweenListAndInputViewBuilder {
VStack {
if viewModel.isLoading {
HStack {
LottieView(animation: .named("message-typing"))
.looping()
.frame(width: 120)
Spacer()
}
.frame(height: 120)
} else {
EmptyView()
}
}
}
}
}
}
} Not perfect, but it do the job ! |
@floriangbh Thank you for the great idea! I ended up just posting an empty message with "..." and then removing it when the response arrives. I love your solution and am going to give it a try today! |
I came across this request and have a very similar question. I don't have multiple users in a chat, only one. But the same question, how can I show a "..." message bubble to indicate that the other user is typing a response? Right now, I present a full-screen "Thinking..." overlay but it is not very satisfying. I would love to present a "..." that is ideally animated (lottie, gif, etc.) to show that a response is coming. Here's how my app looks today for some context.
Can you offer any advice?
Thank you,
John K.
The text was updated successfully, but these errors were encountered: