Add "view once" tooltip.

This commit is contained in:
Matthew Chen 2019-12-06 13:06:14 -03:00
parent 1bfdef6bbc
commit 4ff0b22df8

View File

@ -347,6 +347,20 @@ class AttachmentTextToolbar: UIView, UITextViewDelegate {
// MARK: - Helpers
// The tooltip lies outside this view's bounds, so we
// need to special-case the hit testing so that it can
// intercept touches within its bounds.
@objc
public override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
if let viewOnceTooltip = self.viewOnceTooltip {
let tooltipFrame = convert(viewOnceTooltip.bounds, from: viewOnceTooltip)
if tooltipFrame.contains(point) {
return true
}
}
return super.point(inside: point, with: event)
}
private var shouldShowViewOnceTooltip: Bool {
guard FeatureFlags.viewOnceSending else {
return false