Skip to content

Commit 6cb0cf2

Browse files
Added public init for UserDisplayInfo
1 parent 1b867f0 commit 6cb0cf2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelViewModel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,11 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
368368
}
369369

370370
extension ChatMessage: Identifiable {
371+
372+
public var scrollMessageId: String {
373+
messageId
374+
}
375+
371376
var messageId: String {
372377
var statesId = "empty"
373378
if localState != nil {

Sources/StreamChatSwiftUI/Utils/MessageCachingUtils.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,10 @@ public struct UserDisplayInfo {
115115
public let id: String
116116
public let name: String
117117
public let imageURL: URL?
118+
119+
public init(id: String, name: String, imageURL: URL?) {
120+
self.id = id
121+
self.name = name
122+
self.imageURL = imageURL
123+
}
118124
}

0 commit comments

Comments
 (0)