Skip to content

Commit 0ec9e10

Browse files
Reseting swiped channel id on view disappear
1 parent 7545e74 commit 0ec9e10

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/MessageActionsViewModel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,9 @@ public struct MessageAction: Identifiable, Equatable {
5656
public struct MessageActionInfo {
5757
let message: ChatMessage
5858
let identifier: String
59+
60+
public init(message: ChatMessage, identifier: String) {
61+
self.message = message
62+
self.identifier = identifier
63+
}
5964
}

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ public struct ChatChannelListView<Factory: ViewFactory>: View {
6969
if viewModel.selectedChannel != nil {
7070
viewModel.hideTabBar = true
7171
}
72+
if viewModel.swipedChannelId != nil {
73+
viewModel.swipedChannelId = nil
74+
}
7275
})
7376
.background(
7477
viewFactory.makeChannelListBackground(colors: colors)

0 commit comments

Comments
 (0)