Appearance: swipe not run

This commit is contained in:
He4eT 2024-12-28 20:29:49 +01:00
commit b3774350e6

View file

@ -145,25 +145,16 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
setHomeListeners() setHomeListeners()
// Task to update the app menu every 5 seconds // Task to update the app menu every 15 seconds
lifecycleScope.launch { lifecycleScope.launch {
lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) { lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) {
while (true) { while (true) {
refreshAppMenu() refreshAppMenu()
delay(5000) delay(15000)
} }
} }
} }
// Task to update the weather every 10 minutes
lifecycleScope.launch(Dispatchers.IO) {
repeatOnLifecycle(Lifecycle.State.STARTED) {
while (true) {
updateWeather()
delay(600000)
}
}
}
setupApps() setupApps()
} }
@ -1180,6 +1171,7 @@ class MainActivity : AppCompatActivity(), SharedPreferences.OnSharedPreferenceCh
} }
} }
else if (deltaX > 0 && abs(deltaX) > swipeThreshold && abs(velocityX) > swipeVelocityThreshold && !sharedPreferenceManager.isGestureEnabled("right")) { else if (deltaX > 0 && abs(deltaX) > swipeThreshold && abs(velocityX) > swipeVelocityThreshold && !sharedPreferenceManager.isGestureEnabled("right")) {
canLaunchShortcut = false
if (gestureUtils.isAccessibilityServiceEnabled( if (gestureUtils.isAccessibilityServiceEnabled(
ScreenLockService::class.java ScreenLockService::class.java
) )