From fe1248fec6a8a0bb4c54b644f56b70490dd8af16 Mon Sep 17 00:00:00 2001 From: Peter-Josef Meisch Date: Fri, 10 Feb 2023 22:16:03 +0100 Subject: [PATCH] Fix refresh of empty conversations (#778) --- .../Sources/Conversations/List/ConversationsListView.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift b/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift index 34dad745..00aad9e0 100644 --- a/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift +++ b/Packages/Conversations/Sources/Conversations/List/ConversationsListView.swift @@ -83,7 +83,11 @@ public struct ConversationsListView: View { } } .refreshable { - await viewModel.fetchConversations() + // 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