Skip to content
Merged
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

# Upcoming

### 🐞 Fixed
- Fix message long press taking too much time to show actions [#648](https://github.com/GetStream/stream-chat-swiftui/pull/648)
### 🔄 Changed
- Message composer now uses `.uploadFile` capability when showing attachment picker icon [#646](https://github.com/GetStream/stream-chat-swiftui/pull/646)
- `ChannelInfoView` now uses `.updateChannelMembers` capability to show "Add Users" button [#651](https://github.com/GetStream/stream-chat-swiftui/pull/651)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,14 @@ public struct MessageContainerView<Factory: ViewFactory>: View {
handleGestureForMessage(showsMessageActions: true)
}
}
.onLongPressGesture(perform: {
if !message.isDeleted {
handleGestureForMessage(showsMessageActions: true)
}
})
.highPriorityGesture(
LongPressGesture()
.onEnded { _ in
if !message.isDeleted {
handleGestureForMessage(showsMessageActions: true)
}
}
)
.offset(x: min(self.offsetX, maximumHorizontalSwipeDisplacement))
.simultaneousGesture(
DragGesture(
Expand Down
12 changes: 1 addition & 11 deletions StreamChatSwiftUITestsAppTests/Robots/UserRobot+Asserts.swift
Original file line number Diff line number Diff line change
Expand Up @@ -931,22 +931,12 @@ extension UserRobot {
let image = attributes.image(in: messageCell)
if isPresent {
image.wait()
sleep(2) // At the moment, this assert is flaky without it
} else {
image.waitForDisappearance()
}

let errMessage = isPresent ? "Image is not presented" : "Image is presented"
XCTAssertTrue(image.exists, errMessage, file: file, line: line)

image.safeTap()
image.waitForDisappearance(timeout: 2)
if image.exists {
image.safeTap()
}

let fullscreenImage = attributes.fullscreenImage().wait()
XCTAssertTrue(fullscreenImage.exists, "Fullscreen \(errMessage)", file: file, line: line)
XCTAssertEqual(isPresent, image.exists, errMessage, file: file, line: line)
return self
}

Expand Down
Loading