diff --git a/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift b/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift index e01c6bb0..5a6e50b3 100644 --- a/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift +++ b/Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift @@ -183,13 +183,6 @@ public struct ChatChannelView: View, KeyboardReadable { viewModel.reactionsShown = false messageDisplayInfo = nil } - .onChange(of: presentationMode.wrappedValue, perform: { newValue in - if newValue.isPresented == false { - viewModel.onViewDissappear() - } else { - viewModel.setActive() - } - }) .background( Color(colors.background).background( TabBarAccessor { _ in @@ -221,9 +214,3 @@ public struct ChatChannelView: View, KeyboardReadable { return bottomPadding } } - -extension PresentationMode: Equatable { - public static func == (lhs: PresentationMode, rhs: PresentationMode) -> Bool { - lhs.isPresented == rhs.isPresented - } -}