mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-09 05:25:08 +01:00
Fix gestureDectector on main crashing sometimes
This commit is contained in:
parent
2a8049fb18
commit
8f55dcc859
@ -95,7 +95,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
||||
private set
|
||||
private var searchDrawable: Drawable? = null
|
||||
private var dismissDrawable: Drawable? = null
|
||||
private lateinit var gestureDetector: GestureDetectorCompat
|
||||
private var gestureDetector: GestureDetectorCompat? = null
|
||||
|
||||
private var snackBar: Snackbar? = null
|
||||
private var extraViewForUndo: View? = null
|
||||
@ -591,7 +591,7 @@ open class MainActivity : BaseActivity<MainActivityBinding>(), DownloadServiceLi
|
||||
}
|
||||
|
||||
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
|
||||
gestureDetector.onTouchEvent(ev)
|
||||
gestureDetector?.onTouchEvent(ev)
|
||||
if (ev?.action == MotionEvent.ACTION_DOWN) {
|
||||
if (snackBar != null && snackBar!!.isShown) {
|
||||
val sRect = Rect()
|
||||
|
Loading…
Reference in New Issue
Block a user