Don't initiate table view cell drag while user is selecting poll options
This commit is contained in:
parent
130da9d4cc
commit
4f2f8d517f
|
@ -33,6 +33,10 @@ class StatusPollView: UIView {
|
|||
private var animator: UIViewPropertyAnimator!
|
||||
private var currentSelectedOptionIndex: Int!
|
||||
|
||||
var isTracking: Bool {
|
||||
optionsView.isTracking
|
||||
}
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
|
|
|
@ -326,8 +326,11 @@ extension TimelineStatusTableViewCell: TableViewSwipeActionProvider {
|
|||
|
||||
extension TimelineStatusTableViewCell: DraggableTableViewCell {
|
||||
func dragItemsForBeginning(session: UIDragSession) -> [UIDragItem] {
|
||||
// the poll options view is tracking while the user is dragging between options
|
||||
// while that's happening, don't initiate a drag
|
||||
guard let status = mastodonController.persistentContainer.status(for: statusID),
|
||||
let accountID = mastodonController.accountInfo?.id else {
|
||||
let accountID = mastodonController.accountInfo?.id,
|
||||
!pollView.isTracking else {
|
||||
return []
|
||||
}
|
||||
let provider = NSItemProvider(object: status.url! as NSURL)
|
||||
|
|
Loading…
Reference in New Issue