mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-02-17 20:10:36 +01:00
Prevent flinging while movement on other axis is active
This commit is contained in:
parent
6c8800f266
commit
a34bab78af
@ -749,6 +749,10 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
}
|
||||
|
||||
override fun onFlingUp() {
|
||||
if (mIgnoreYMoveEvents) {
|
||||
return
|
||||
}
|
||||
|
||||
if (!isWidgetsFragmentExpanded()) {
|
||||
mIgnoreUpEvent = true
|
||||
showFragment(binding.allAppsFragment)
|
||||
@ -757,6 +761,10 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
override fun onFlingDown() {
|
||||
if (mIgnoreYMoveEvents) {
|
||||
return
|
||||
}
|
||||
|
||||
mIgnoreUpEvent = true
|
||||
if (isAllAppsFragmentExpanded()) {
|
||||
hideFragment(binding.allAppsFragment)
|
||||
@ -771,11 +779,19 @@ class MainActivity : SimpleActivity(), FlingListener {
|
||||
}
|
||||
|
||||
override fun onFlingRight() {
|
||||
if (mIgnoreXMoveEvents) {
|
||||
return
|
||||
}
|
||||
|
||||
mIgnoreUpEvent = true
|
||||
binding.homeScreenGrid.root.prevPage(redraw = true)
|
||||
}
|
||||
|
||||
override fun onFlingLeft() {
|
||||
if (mIgnoreXMoveEvents) {
|
||||
return
|
||||
}
|
||||
|
||||
mIgnoreUpEvent = true
|
||||
binding.homeScreenGrid.root.nextPage(redraw = true)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user