Fix refresh of empty conversations (#778)

This commit is contained in:
Peter-Josef Meisch 2023-02-10 22:16:03 +01:00 committed by GitHub
parent 4e2d15eff6
commit fe1248fec6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,8 +83,12 @@ public struct ConversationsListView: View {
}
}
.refreshable {
// note: this Task wrapper should not be necessary, but it reportedly crashes without it
// when refreshing on an empty list
Task {
await viewModel.fetchConversations()
}
}
.onAppear {
viewModel.client = client
if client.isAuth {