From 1f3898c69d85b6b1e690eb8be11b009336762a4b Mon Sep 17 00:00:00 2001 From: Mauro <34335419+Velin92@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:17:36 +0200 Subject: [PATCH] remove `reply in thread` in the swipe action (#1795) * remove `reply in thread` in the swipe action * changelog * removed v stack --- .../View/Style/SwipeToReplyView.swift | 22 +++---------------- .../PreviewTests/test_swipeToReplyView.2.png | 3 --- changelog.d/pr-1795.change | 1 + 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 UnitTests/__Snapshots__/PreviewTests/test_swipeToReplyView.2.png create mode 100644 changelog.d/pr-1795.change diff --git a/ElementX/Sources/Screens/RoomScreen/View/Style/SwipeToReplyView.swift b/ElementX/Sources/Screens/RoomScreen/View/Style/SwipeToReplyView.swift index e06840826..b7973b65a 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/Style/SwipeToReplyView.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/Style/SwipeToReplyView.swift @@ -20,17 +20,9 @@ struct SwipeToReplyView: View { let timelineItem: RoomTimelineItemProtocol var body: some View { - VStack(spacing: 4) { - Image(systemName: "arrowshape.turn.up.left") - .foregroundColor(.compound.iconPrimary) - if let messageTimelineItem = timelineItem as? EventBasedMessageTimelineItemProtocol, - messageTimelineItem.isThreaded { - Text(L10n.actionReplyInThread) - .font(.compound.bodyXS) - .foregroundColor(.compound.textPrimary) - } - } - .accessibilityHidden(true) + Image(systemName: "arrowshape.turn.up.left") + .foregroundColor(.compound.iconPrimary) + .accessibilityHidden(true) } } @@ -41,16 +33,8 @@ struct SwipeToReplyView_Previews: PreviewProvider, TestablePreview { isEditable: true, isThreaded: false, sender: .init(id: ""), content: .init(body: "")) - static let threadedTimelineItem = TextRoomTimelineItem(id: .init(timelineID: ""), - timestamp: "", - isOutgoing: true, - isEditable: true, - isThreaded: true, - sender: .init(id: ""), - content: .init(body: "")) static var previews: some View { SwipeToReplyView(timelineItem: timelineItem) - SwipeToReplyView(timelineItem: threadedTimelineItem) } } diff --git a/UnitTests/__Snapshots__/PreviewTests/test_swipeToReplyView.2.png b/UnitTests/__Snapshots__/PreviewTests/test_swipeToReplyView.2.png deleted file mode 100644 index 02e4d6ca6..000000000 --- a/UnitTests/__Snapshots__/PreviewTests/test_swipeToReplyView.2.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a516bfff3913d6945921fb390af3f256e2bf15982f3a8ac60c7fcabbd0b37749 -size 61345 diff --git a/changelog.d/pr-1795.change b/changelog.d/pr-1795.change new file mode 100644 index 000000000..b96c8cc37 --- /dev/null +++ b/changelog.d/pr-1795.change @@ -0,0 +1 @@ +Removed the `Reply in Thread` string in the swipe to reply action. \ No newline at end of file