From 2a6cf390d6e7d4ff00ef6f08435454400af70978 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Mon, 25 Sep 2023 11:12:59 +0100 Subject: [PATCH] Fix replying in UI tests. (#1792) --- .../Sources/Screens/RoomScreen/View/SwipeRightAction.swift | 7 +++---- ElementX/Sources/Services/Timeline/TimelineItemProxy.swift | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ElementX/Sources/Screens/RoomScreen/View/SwipeRightAction.swift b/ElementX/Sources/Screens/RoomScreen/View/SwipeRightAction.swift index 8afc65a3b..f9390d2e4 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/SwipeRightAction.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/SwipeRightAction.swift @@ -75,16 +75,15 @@ struct SwipeRightAction: ViewModifier { } xOffset = 0.0 - } - ) - .onChange(of: dragGestureActive, perform: { value in + }) + .onChange(of: dragGestureActive) { value in if value == true { if shouldStartAction() { feedbackGenerator.prepare() canStartAction = true } } - }) + } .overlay(alignment: .leading) { // We want the action icon to follow the view translation and gradually fade in label() diff --git a/ElementX/Sources/Services/Timeline/TimelineItemProxy.swift b/ElementX/Sources/Services/Timeline/TimelineItemProxy.swift index aa1664632..4996dcf0a 100644 --- a/ElementX/Sources/Services/Timeline/TimelineItemProxy.swift +++ b/ElementX/Sources/Services/Timeline/TimelineItemProxy.swift @@ -34,7 +34,7 @@ struct TimelineItemIdentifier: Hashable { extension TimelineItemIdentifier { /// Use only for mocks/tests static var random: Self { - .init(timelineID: UUID().uuidString) + .init(timelineID: UUID().uuidString, eventID: UUID().uuidString) } }