Skip to content

Conversation

@laevandus
Copy link
Contributor

@laevandus laevandus commented Dec 5, 2025

🔗 Issue Links

Fixes: IOS-1214

🎯 Goal

Scrolling does not work when dragging from a message, but only if message list is shown with a sheet on iOS 26

📝 Summary

  • Move simultaneous drag gesture to the ScrollView from the message view
  • Propagate dragging state to message items which will handle swipe to reply

🛠 Implementation

iOS 26 changed how simultaneous gestures work:

Fixed: Gestures added using the simultaneousGesture(_:isEnabled:) view modifier are incorrectly simultaneous with ancestor gestures. (147970990)

This breaks scrolling when our drag gesture is used for swiping. Fix is to attach the gesture to the ScrollView directly.

🎨 Showcase

At the end of the before video, scrolling stops working.

Before After
img img

🧪 Manual Testing Notes

Change the SDK to open channel in a sheet. Quick and dirty change:

diff --git a/DemoAppSwiftUI/DemoAppSwiftUIApp.swift b/DemoAppSwiftUI/DemoAppSwiftUIApp.swift
index 02ffe0dd..784b79b5 100644
--- a/DemoAppSwiftUI/DemoAppSwiftUIApp.swift
+++ b/DemoAppSwiftUI/DemoAppSwiftUIApp.swift
@@ -14,6 +14,7 @@ struct DemoAppSwiftUIApp: App {
 
     @ObservedObject var appState = AppState.shared
     @ObservedObject var notificationsHandler = NotificationsHandler.shared
+    @State private var presentedChannel: ChatChannel?
 
     var channelListController: ChatChannelListController? {
         appState.channelListController
@@ -40,6 +41,9 @@ struct DemoAppSwiftUIApp: App {
                         .badge(appState.unreadCount.threads)
                 }
                 .id(appState.contentIdentifier)
+                .sheet(item: $presentedChannel, content: { channel in
+                    ChatChannelView(channelController: chatClient.channelController(for: channel.cid))
+                })
             }
         }
         .onChange(of: appState.userState) { newValue in
@@ -61,6 +65,9 @@ struct DemoAppSwiftUIApp: App {
             ChatChannelListView(
                 viewFactory: DemoAppFactory.shared,
                 channelListController: channelListController,
+                onItemTap: { channel in
+                    presentedChannel = channel
+                },
                 searchType: channelListSearchType
             )
         }
  1. Open a channel with preferably long message
  2. Try to swipe to reply and scrolling up and down while dragging from the message bubble. Result: view is scrolled as expected (I found scrolling stopping to work after triggering swipe to reply or just trying a scrolling down and then up. It reproduces pretty quickly)

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@laevandus laevandus requested a review from a team as a code owner December 5, 2025 11:54
@laevandus laevandus force-pushed the fix/ios-26-swipe-when-sheet branch from 48a5c27 to 0926cc2 Compare December 5, 2025 12:00
@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChatSwiftUI 9.68 MB 9.7 MB +17 KB 🟢

@github-actions
Copy link

github-actions bot commented Dec 5, 2025

Public Interface

🚀 No changes affecting the public interface.

@Stream-SDK-Bot
Copy link
Collaborator

StreamChatSwiftUI XCSize

Object Diff (bytes)
MessageListView.o +7559
MessageContainerView.o -1472
PollAllOptionsView.o +471
AudioSessionFeedbackGenerator.o +392
ChatChannelSwipeableListItem.o +196
TrailingComposerView.o -82
ImageDecoders+Default.o -76

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 5, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copy link
Member

@nuno-vieira nuno-vieira left a comment

Choose a reason for hiding this comment

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

LGTM! ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants