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 {
64
64
}
65
65
66
66
func quotedMessage( for message: ChatMessage ) -> ChatMessage ? {
67
+ if StreamRuntimeCheck . _isDatabaseObserverItemReusingEnabled {
68
+ return message. quotedMessage
69
+ }
70
+
67
71
if checkedMessageIds. contains ( message. id) {
68
72
return nil
69
73
}
Original file line number Diff line number Diff line change @@ -25,6 +25,17 @@ class MessageCachingUtils_Tests: StreamChatTestCase {
25
25
author: author
26
26
)
27
27
)
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
+ }
28
39
29
40
func test_messageCachingUtils_authorId( ) {
30
41
// Given
You can’t perform that action at this time.
0 commit comments