From 838623171d95e762cc28516a927dda51151b66f4 Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Mon, 22 Aug 2022 16:33:25 +1000 Subject: [PATCH] tweak: always left align emoji reacts --- .../Content Views/ReactionContainerView.swift | 17 +++-------------- .../Message Cells/VisibleMessageCell.swift | 1 - 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Session/Conversations/Message Cells/Content Views/ReactionContainerView.swift b/Session/Conversations/Message Cells/Content Views/ReactionContainerView.swift index 15826ab44..982195f50 100644 --- a/Session/Conversations/Message Cells/Content Views/ReactionContainerView.swift +++ b/Session/Conversations/Message Cells/Content Views/ReactionContainerView.swift @@ -5,7 +5,6 @@ import SessionUIKit final class ReactionContainerView: UIView { var showingAllReactions = false - private var isOutgoingMessage = false private var showNumbers = true private var maxEmojisPerLine = isIPhone6OrSmaller ? 5 : 6 @@ -68,9 +67,8 @@ final class ReactionContainerView: UIView { mainStackView.pin(to: self) } - public func update(_ reactions: [ReactionViewModel], isOutgoingMessage: Bool, showNumbers: Bool) { + public func update(_ reactions: [ReactionViewModel], showNumbers: Bool) { self.reactions = reactions - self.isOutgoingMessage = isOutgoingMessage self.showNumbers = showNumbers prepareForUpdate() @@ -89,15 +87,6 @@ final class ReactionContainerView: UIView { stackView.spacing = Values.smallSpacing stackView.alignment = .center - if isOutgoingMessage { - stackView.semanticContentAttribute = .forceRightToLeft - reactionContainerView.semanticContentAttribute = .forceRightToLeft - } - else { - stackView.semanticContentAttribute = .unspecified - reactionContainerView.semanticContentAttribute = .unspecified - } - var displayedReactions: [ReactionViewModel] var expandButtonReactions: [EmojiWithSkinTones] @@ -168,14 +157,14 @@ final class ReactionContainerView: UIView { guard !showingAllReactions else { return } showingAllReactions = true - update(reactions, isOutgoingMessage: isOutgoingMessage, showNumbers: showNumbers) + update(reactions, showNumbers: showNumbers) } public func showLessEmojis() { guard showingAllReactions else { return } showingAllReactions = false - update(reactions, isOutgoingMessage: isOutgoingMessage, showNumbers: showNumbers) + update(reactions, showNumbers: showNumbers) } } diff --git a/Session/Conversations/Message Cells/VisibleMessageCell.swift b/Session/Conversations/Message Cells/VisibleMessageCell.swift index d50f8618b..721244882 100644 --- a/Session/Conversations/Message Cells/VisibleMessageCell.swift +++ b/Session/Conversations/Message Cells/VisibleMessageCell.swift @@ -641,7 +641,6 @@ final class VisibleMessageCell: MessageCell, TappableLabelDelegate { reactionContainerView.showingAllReactions = showExpandedReactions reactionContainerView.update( reactions.orderedValues, - isOutgoingMessage: (cellViewModel.variant == .standardOutgoing), showNumbers: ( cellViewModel.threadVariant == .closedGroup || cellViewModel.threadVariant == .openGroup