Skip to content

Commit

Permalink
Update LCManager.swift
Browse files Browse the repository at this point in the history
Code maintenance, fix for grabber long press bug.
  • Loading branch information
duraidabdul committed Aug 28, 2021
1 parent cf0d3be commit 265eaea
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Sources/LocalConsole/LCManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,6 @@ public class LCManager: NSObject, UIGestureRecognizerDelegate {
}
}

@objc func toggleLock() {
scrollLocked.toggle()
}

func commitTextChanges(requestMenuUpdate menuUpdateRequested: Bool) {

if consoleTextView.contentOffset.y > consoleTextView.contentSize.height - consoleTextView.bounds.size.height - 20 {
Expand Down Expand Up @@ -758,7 +754,7 @@ public class LCManager: NSObject, UIGestureRecognizerDelegate {
}.startAnimation()
case .cancelled, .ended:

scrollLocked = true
if !grabberMode { scrollLocked = true }

UIViewPropertyAnimator(duration: 0.8, dampingRatio: 0.5) { [self] in
consoleView.transform = .init(scaleX: 1, y: 1)
Expand Down Expand Up @@ -866,15 +862,9 @@ public class LCManager: NSObject, UIGestureRecognizerDelegate {
switch recognizer.state {
case .began:
consolePiPTouchDown()
case .cancelled:
consolePiPTouchUp()
case .changed:
break
case .ended:
consolePiPTouchUp()
case .failed:
consolePiPTouchUp()
case .possible:
case .ended, .cancelled, .possible, .failed:
consolePiPTouchUp()
@unknown default:
break
Expand Down

0 comments on commit 265eaea

Please sign in to comment.