From 78d3000fa9fce89a1648b80e7835d25aed855627 Mon Sep 17 00:00:00 2001 From: martinmitrevski Date: Thu, 7 Dec 2023 17:59:44 +0100 Subject: [PATCH] Unread count fix --- .../Reactions/MessageActions/DefaultMessageActions.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/DefaultMessageActions.swift b/Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/DefaultMessageActions.swift index cd32f140..7f42fc0d 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/DefaultMessageActions.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/DefaultMessageActions.swift @@ -453,7 +453,9 @@ extension MessageAction { onFinish: @escaping (MessageActionInfo) -> Void, onError: @escaping (Error) -> Void ) -> MessageAction { - let channelController = chatClient.channelController(for: channel.cid) + let channelController = InjectedValues[\.utils] + .channelControllerFactory + .makeChannelController(for: channel.cid) let action = { channelController.markUnread(from: message.id) { result in if case let .failure(error) = result {