mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 19:38:21 +00:00
Constrain scroll amount
Test: scroll vertically and horizontally Fixes: 196309367 Change-Id: Ibf16fb72cf95e29ed820d5f511e764a388c93bb0
This commit is contained in:
@@ -274,7 +274,7 @@ public class DepthController implements StateHandler<LauncherState>,
|
||||
public void onOverlayScrollChanged(float progress) {
|
||||
// Round out the progress to dedupe frequent, non-perceptable updates
|
||||
int progressI = (int) (progress * 256);
|
||||
float progressF = progressI / 256f;
|
||||
float progressF = Utilities.boundToRange(progressI / 256f, 0f, 1f);
|
||||
if (Float.compare(mOverlayScrollProgress, progressF) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user