File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Sources/StreamChatSwiftUI Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ struct MessageContainerView<Factory: ViewFactory>: View {
140
140
if showsAllInfo && !message. isDeleted {
141
141
if isInGroup && !message. isSentByCurrentUser {
142
142
MessageAuthorAndDateView ( message: message)
143
- } else if message. isSentByCurrentUser {
143
+ } else if message. isSentByCurrentUser && channel . config . readEventsEnabled {
144
144
HStack ( spacing: 4 ) {
145
145
factory. makeMessageReadIndicatorView (
146
146
channel: channel,
Original file line number Diff line number Diff line change @@ -69,9 +69,7 @@ public struct ChatChannelListItem: View {
69
69
}
70
70
71
71
HStack ( spacing: 4 ) {
72
- if let message = channel. latestMessages. first,
73
- message. isSentByCurrentUser,
74
- !message. isDeleted {
72
+ if shouldShowReadEvents {
75
73
MessageReadIndicatorView (
76
74
readUsers: channel. readUsers (
77
75
currentUserId: chatClient. currentUserId
@@ -91,6 +89,16 @@ public struct ChatChannelListItem: View {
91
89
. id ( " \( channel. id) -base " )
92
90
}
93
91
92
+ private var shouldShowReadEvents : Bool {
93
+ if let message = channel. latestMessages. first,
94
+ message. isSentByCurrentUser,
95
+ !message. isDeleted {
96
+ return channel. config. readEventsEnabled
97
+ }
98
+
99
+ return false
100
+ }
101
+
94
102
private var shouldShowTypingIndicator : Bool {
95
103
!channel. currentlyTypingUsersFiltered (
96
104
currentUserId: chatClient. currentUserId
You can’t perform that action at this time.
0 commit comments