Skip to content

Commit 1c38893

Browse files
Made public channel extensions
1 parent 16939dc commit 1c38893

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListItem.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,21 @@ public struct InjectedChannelInfo {
195195

196196
extension ChatChannel {
197197

198-
var lastMessageText: String? {
198+
public var lastMessageText: String? {
199199
if let latestMessage = latestMessages.first {
200200
return "\(latestMessage.author.name ?? latestMessage.author.id): \(latestMessage.textContent ?? latestMessage.text)"
201201
} else {
202202
return nil
203203
}
204204
}
205205

206-
var shouldShowTypingIndicator: Bool {
206+
public var shouldShowTypingIndicator: Bool {
207207
!currentlyTypingUsersFiltered(
208208
currentUserId: InjectedValues[\.chatClient].currentUserId
209209
).isEmpty && config.typingEventsEnabled
210210
}
211211

212-
var subtitleText: String {
212+
public var subtitleText: String {
213213
if isMuted {
214214
return L10n.Channel.Item.muted
215215
} else if shouldShowTypingIndicator {
@@ -221,7 +221,7 @@ extension ChatChannel {
221221
}
222222
}
223223

224-
var timestampText: String {
224+
public var timestampText: String {
225225
if let lastMessageAt = lastMessageAt {
226226
return InjectedValues[\.utils].dateFormatter.string(from: lastMessageAt)
227227
} else {

Sources/StreamChatSwiftUI/Utils/Modifiers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ extension View {
8181
}
8282

8383
extension Image {
84-
func customizable() -> some View {
84+
public func customizable() -> some View {
8585
renderingMode(.template)
8686
.resizable()
8787
.scaledToFit()

0 commit comments

Comments
 (0)