Skip to content

Commit baf569e

Browse files
Updated the gems
1 parent 3a898be commit baf569e

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ GEM
1717
artifactory (3.0.15)
1818
atomos (0.1.3)
1919
aws-eventstream (1.2.0)
20-
aws-partitions (1.581.0)
20+
aws-partitions (1.583.0)
2121
aws-sdk-core (3.130.2)
2222
aws-eventstream (~> 1, >= 1.0.2)
2323
aws-partitions (~> 1, >= 1.525.0)
@@ -26,7 +26,7 @@ GEM
2626
aws-sdk-kms (1.56.0)
2727
aws-sdk-core (~> 3, >= 3.127.0)
2828
aws-sigv4 (~> 1.1)
29-
aws-sdk-s3 (1.113.2)
29+
aws-sdk-s3 (1.114.0)
3030
aws-sdk-core (~> 3, >= 3.127.0)
3131
aws-sdk-kms (~> 1)
3232
aws-sigv4 (~> 1.4)

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
115115
makeDefaultChannelListController()
116116
}
117117
setupChannelListController()
118+
observeChannelDismiss()
118119
}
119120

120121
/// Returns the name for the specified channel.
@@ -356,6 +357,27 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
356357
channels = queuedChannelsChanges
357358
}
358359
}
360+
361+
private func observeChannelDismiss() {
362+
NotificationCenter.default.addObserver(
363+
self,
364+
selector: #selector(updateQueuedChannels),
365+
name: NSNotification.Name(channelDismissed),
366+
object: nil
367+
)
368+
}
369+
370+
@objc private func updateQueuedChannels() {
371+
if !queuedChannelsChanges.isEmpty {
372+
channels = queuedChannelsChanges
373+
}
374+
}
375+
}
376+
377+
private let channelDismissed = "io.getstream.channelDismissed"
378+
379+
public func notifyChannelDismiss() {
380+
NotificationCenter.default.post(name: NSNotification.Name(channelDismissed), object: nil)
359381
}
360382

361383
/// Enum for the type of alert presented in the channel list view.

0 commit comments

Comments
 (0)