mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-10 21:36:49 +10:00
use menuDirectionUpThreshold
This commit is contained in:
@@ -81,6 +81,10 @@ class YepConfig {
|
||||
return 100
|
||||
}
|
||||
|
||||
struct Conversation {
|
||||
static let menuDirectionUpThreshold: CGFloat = 64 + 60
|
||||
}
|
||||
|
||||
struct AudioRecord {
|
||||
static let shortestDuration: NSTimeInterval = 0.5
|
||||
static let longestDuration: NSTimeInterval = 60
|
||||
|
||||
@@ -1951,7 +1951,7 @@ extension ConversationViewController: UICollectionViewDataSource, UICollectionVi
|
||||
|
||||
let textViewFrame = cell.convertRect(cell.textContentTextView.frame, toView: strongSelf.view)
|
||||
|
||||
let arrowDirection: BubbleMenuView.ArrowDirection = CGRectGetMidY(textViewFrame) < 64 + 80 ? .Up : .Down
|
||||
let arrowDirection: BubbleMenuView.ArrowDirection = CGRectGetMidY(textViewFrame) < YepConfig.Conversation.menuDirectionUpThreshold ? .Up : .Down
|
||||
|
||||
let menu = BubbleMenuView(arrowDirection: arrowDirection, items: [copyItem])
|
||||
|
||||
@@ -2232,7 +2232,7 @@ extension ConversationViewController: UICollectionViewDataSource, UICollectionVi
|
||||
|
||||
let textViewFrame = cell.convertRect(cell.textContentTextView.frame, toView: strongSelf.view)
|
||||
|
||||
let arrowDirection: BubbleMenuView.ArrowDirection = CGRectGetMidY(textViewFrame) < 64 + 80 ? .Up : .Down
|
||||
let arrowDirection: BubbleMenuView.ArrowDirection = CGRectGetMidY(textViewFrame) < YepConfig.Conversation.menuDirectionUpThreshold ? .Up : .Down
|
||||
|
||||
let menu = BubbleMenuView(arrowDirection: arrowDirection, items: [copyItem, deleteItem])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user