ui: add to do for expand button

pull/638/head
Ryan Zhao 2 years ago
parent 5feb87f069
commit 6af2d29582

@ -11,6 +11,7 @@ final class ReactionContainerView : UIView {
private var showingAllReactions = false private var showingAllReactions = false
var reactionViews: [ReactionView] = [] var reactionViews: [ReactionView] = []
var expandButton: ExpandingReactionButton?
// MARK: Lifecycle // MARK: Lifecycle
init() { init() {
@ -56,8 +57,10 @@ final class ReactionContainerView : UIView {
reactionViews.append(reactionView) reactionViews.append(reactionView)
} }
if expandButtonReactions.count > 0 { if expandButtonReactions.count > 0 {
let expandButton = ExpandingReactionButton(emojis: expandButtonReactions) expandButton = ExpandingReactionButton(emojis: expandButtonReactions)
stackView.addArrangedSubview(expandButton) stackView.addArrangedSubview(expandButton)
} else {
expandButton = nil
} }
containerView.addArrangedSubview(stackView) containerView.addArrangedSubview(stackView)
} }

@ -557,9 +557,12 @@ final class VisibleMessageCell : MessageCell, LinkPreviewViewDelegate {
} else { } else {
delegate?.quickReact(viewItem, with: reactionView.emoji) delegate?.quickReact(viewItem, with: reactionView.emoji)
} }
break return
} }
} }
if let expandButton = reactionContainerView.expandButton, expandButton.frame.contains(convertedLocation) {
// TODO: show all emojis
}
} else { } else {
delegate?.handleViewItemTapped(viewItem, gestureRecognizer: gestureRecognizer) delegate?.handleViewItemTapped(viewItem, gestureRecognizer: gestureRecognizer)
} }

Loading…
Cancel
Save