Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
viewModel.reactionsShown = false
messageDisplayInfo = nil
}
.onChange(of: presentationMode.wrappedValue, perform: { newValue in
if newValue.isPresented == false {
viewModel.onViewDissappear()
} else {
viewModel.setActive()
}
})
Comment on lines -186 to -192
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens on iOS 26.1 beta is that onChange gets called with new value being false. On iOS 26.0 and earlier, it does not get called. Moreover, above we use onAppear and onDisappear for updating the isActive state and that already works correctly on both iOS 26 versions. Therefore, the fix is to delete it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was added because it was not updating when swiping back slowly. Can you test that before merging it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swiping back slowly seems to work OK 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test would be -> go into the channel, send a message in another one, slowly swipe back and see there's an unread indicator on the other channel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work OK as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, approving

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@testableapple could you please try as well for making sure I did not miss anything here

.background(
Color(colors.background).background(
TabBarAccessor { _ in
Expand Down Expand Up @@ -221,9 +214,3 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
return bottomPadding
}
}

extension PresentationMode: Equatable {
public static func == (lhs: PresentationMode, rhs: PresentationMode) -> Bool {
lhs.isPresented == rhs.isPresented
}
}
Loading