Add "view once" tooltip.
This commit is contained in:
parent
1bfdef6bbc
commit
4ff0b22df8
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user