Skip to content

Commit

Permalink
Removing duplicate timer invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
scalessec committed Nov 20, 2017
1 parent 769578c commit 31f1b10
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Toast/Toast.swift
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ public extension UIView {

@objc
private func handleToastTapped(_ recognizer: UITapGestureRecognizer) {
guard let toast = recognizer.view, let timer = objc_getAssociatedObject(toast, &ToastKeys.timer) as? Timer else { return }
timer.invalidate()
guard let toast = recognizer.view else { return }
hideToast(toast, fromTap: true)
}

Expand Down

0 comments on commit 31f1b10

Please sign in to comment.