Fix refresh of empty conversations (#778)
This commit is contained in:
parent
4e2d15eff6
commit
fe1248fec6
|
@ -83,8 +83,12 @@ public struct ConversationsListView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.refreshable {
|
.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()
|
await viewModel.fetchConversations()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.onAppear {
|
.onAppear {
|
||||||
viewModel.client = client
|
viewModel.client = client
|
||||||
if client.isAuth {
|
if client.isAuth {
|
||||||
|
|
Loading…
Reference in New Issue