ui: add to do for expand button

This commit is contained in:
Ryan Zhao 2022-05-19 17:15:36 +10:00
parent 5feb87f069
commit 6af2d29582
2 changed files with 8 additions and 2 deletions

View File

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

View File

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