File tree 2 files changed +16
-8
lines changed
Sources/StreamChatSwiftUI/ChatChannel/MessageList
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3
3
4
4
# Upcoming
5
5
6
- ### 🔄 Changed
6
+ ### 🐞 Fixed
7
+ - Fixed visibility for deleted messages indicator for current user
7
8
8
9
# [ 4.38.0] ( https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.38.0 )
9
10
_ September 29, 2023_
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import SwiftUI
7
7
8
8
/// View displayed when a message is deleted.
9
9
public struct DeletedMessageView : View {
10
+ @Injected ( \. chatClient) private var chatClient
10
11
@Injected ( \. images) private var images
11
12
@Injected ( \. fonts) private var fonts
12
13
@Injected ( \. colors) private var colors
@@ -15,6 +16,10 @@ public struct DeletedMessageView: View {
15
16
private var dateFormatter : DateFormatter {
16
17
utils. dateFormatter
17
18
}
19
+
20
+ private var deletedMessageVisibility : ChatClientConfig . DeletedMessageVisibility {
21
+ chatClient. config. deletedMessagesVisibility
22
+ }
18
23
19
24
var message : ChatMessage
20
25
var isFirst : Bool
@@ -35,14 +40,16 @@ public struct DeletedMessageView: View {
35
40
HStack {
36
41
Spacer ( )
37
42
38
- Image ( uiImage: images. eye)
39
- . customizable ( )
40
- . frame ( maxWidth: 12 )
41
- . accessibilityIdentifier ( " onlyVisibleToYouImageView " )
43
+ if deletedMessageVisibility == . visibleForCurrentUser {
44
+ Image ( uiImage: images. eye)
45
+ . customizable ( )
46
+ . frame ( maxWidth: 12 )
47
+ . accessibilityIdentifier ( " onlyVisibleToYouImageView " )
42
48
43
- Text ( L10n . Message. onlyVisibleToYou)
44
- . font ( fonts. footnote)
45
- . accessibilityIdentifier ( " onlyVisibleToYouLabel " )
49
+ Text ( L10n . Message. onlyVisibleToYou)
50
+ . font ( fonts. footnote)
51
+ . accessibilityIdentifier ( " onlyVisibleToYouLabel " )
52
+ }
46
53
47
54
Text ( dateFormatter. string ( from: message. createdAt) )
48
55
. font ( fonts. footnote)
You can’t perform that action at this time.
0 commit comments