Make the FAB scroll listener a less sensitive

This should help minimize the glitchiness that can occur when scrolling
through the entry list.

Close #963.
This commit is contained in:
Alexander Bakker 2022-09-17 18:27:56 +02:00
parent 80624f844c
commit e4798703f0

View file

@ -16,9 +16,9 @@ public class FabScrollHelper {
}
public void onScroll(int dx, int dy) {
if (dy > 0 && _fabMenu.getVisibility() == View.VISIBLE && !_isAnimating) {
if (dy > 2 && _fabMenu.getVisibility() == View.VISIBLE && !_isAnimating) {
setVisible(false);
} else if (dy < 0 && _fabMenu.getVisibility() != View.VISIBLE && !_isAnimating) {
} else if (dy < -2 && _fabMenu.getVisibility() != View.VISIBLE && !_isAnimating) {
setVisible(true);
}
}