-
Couldn't load subscription status.
- Fork 111
Fix ChatChannelView isActive when presented using UIKit on iOS 26.1 beta #1007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Generated by 🚫 Danger |
2721734 to
ea262c3
Compare
| .onChange(of: presentationMode.wrappedValue, perform: { newValue in | ||
| if newValue.isPresented == false { | ||
| viewModel.onViewDissappear() | ||
| } else { | ||
| viewModel.setActive() | ||
| } | ||
| }) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, approving
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready now
Public Interface- extension PresentationMode: Equatable
-
- public static func ==(lhs: PresentationMode,rhs: PresentationMode)-> Bool
|
SDK Size
|
|
StreamChatSwiftUI XCSize
|



🔗 Issue Links
Resolves: IOS-1192
🎯 Goal
Fix isActive getting set to false in ChatChannelViewModel because presentation mode onChange is triggered with iOS 26.1 (this is only a problem when ChatChannelView is presented with UIKit)
📝 Summary
Provide bullet points with the most important changes in the codebase.
🛠 Implementation
🎨 Showcase
🧪 Manual Testing Notes
☑️ Contributor Checklist
docs-contentrepo