File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Sources/StreamChatSwiftUI/Utils
StreamChatSwiftUITests/Tests/ChatChannel Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ class MessageCachingUtils {
6464 }
6565
6666 func quotedMessage( for message: ChatMessage ) -> ChatMessage ? {
67+ if StreamRuntimeCheck . _isDatabaseObserverItemReusingEnabled {
68+ return message. quotedMessage
69+ }
70+
6771 if checkedMessageIds. contains ( message. id) {
6872 return nil
6973 }
Original file line number Diff line number Diff line change @@ -25,6 +25,17 @@ class MessageCachingUtils_Tests: StreamChatTestCase {
2525 author: author
2626 )
2727 )
28+
29+ private var initialReusingState = false
30+
31+ override func setUpWithError( ) throws {
32+ initialReusingState = StreamRuntimeCheck . _isDatabaseObserverItemReusingEnabled
33+ StreamRuntimeCheck . _isDatabaseObserverItemReusingEnabled = false
34+ }
35+
36+ override func tearDownWithError( ) throws {
37+ StreamRuntimeCheck . _isDatabaseObserverItemReusingEnabled = initialReusingState
38+ }
2839
2940 func test_messageCachingUtils_authorId( ) {
3041 // Given
You can’t perform that action at this time.
0 commit comments