You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Add `heic`, `heif` and `svg` formats to the supported image file types [#3883](https://github.com/GetStream/stream-chat-swift/pull/3883)
12
+
- Add `ChatChannelController.markUnread(from:completion:)` and `Chat.markUnread(from:)` where the from argument is `Date`[#3885](https://github.com/GetStream/stream-chat-swift/pull/3885)
12
13
- Add support for filter tags in channels [#3886](https://github.com/GetStream/stream-chat-swift/pull/3886)
Copy file name to clipboardExpand all lines: DemoApp/StreamChat/Components/DemoChatChannelListRouter.swift
+18Lines changed: 18 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -463,6 +463,24 @@ final class DemoChatChannelListRouter: ChatChannelListRouter {
463
463
}
464
464
}
465
465
}),
466
+
.init(title:"Mark channel unread with timestamp", isEnabled:true, handler:{[unowned self] _ in
467
+
self.rootViewController.presentAlert(title:"Mark messages as unread with timestamp", message:"Marks messages as unread from the last number of days", textFieldPlaceholder:"Days"){ offsetInDaysString in
Copy file name to clipboardExpand all lines: Sources/StreamChat/Controllers/ChannelController/ChannelController.swift
+41-1Lines changed: 41 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1333,7 +1333,47 @@ public class ChatChannelController: DataController, DelegateCallable, DataStoreP
1333
1333
}
1334
1334
1335
1335
readStateHandler.markUnread(
1336
-
from: messageId,
1336
+
from:.messageId(messageId),
1337
+
in: channel
1338
+
){[weak self] result in
1339
+
self?.callback{
1340
+
completion?(result)
1341
+
}
1342
+
}
1343
+
}
1344
+
1345
+
/// Marks all messages of the channel as unread that were created after the specified timestamp.
1346
+
///
1347
+
/// This method finds the first message with a creation timestamp greater than to the provided timestamp,
1348
+
/// and marks all messages from that point forward as unread. If no message is found after the timestamp,
1349
+
/// the operation completes without error but no messages are marked as unread.
1350
+
///
1351
+
/// - Parameters:
1352
+
/// - timestamp: The timestamp used to find the first message to mark as unread. All messages created after this timestamp will be marked as unread.
1353
+
/// - completion: The completion handler to be called after marking messages as unread. Called with a `Result` containing the updated `ChatChannel` on success, or an `Error` on failure.
0 commit comments