mirror of https://github.com/M66B/FairEmail.git
Refactoring
This commit is contained in:
parent
f16649d85e
commit
97e6ad8557
|
@ -4893,14 +4893,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
return (up && onReply(context));
|
return (up && onReply(context));
|
||||||
case KeyEvent.KEYCODE_PAGE_UP:
|
case KeyEvent.KEYCODE_PAGE_UP:
|
||||||
case KeyEvent.KEYCODE_DPAD_UP:
|
case KeyEvent.KEYCODE_DPAD_UP:
|
||||||
if (up)
|
if (viewType == AdapterMessage.ViewType.THREAD)
|
||||||
rvMessage.scrollBy(0, -context.getResources().getDisplayMetrics().heightPixels / 2);
|
return (up && onScroll(context, true));
|
||||||
return up;
|
break;
|
||||||
case KeyEvent.KEYCODE_PAGE_DOWN:
|
case KeyEvent.KEYCODE_PAGE_DOWN:
|
||||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||||
if (up)
|
if (viewType == AdapterMessage.ViewType.THREAD)
|
||||||
rvMessage.scrollBy(0, context.getResources().getDisplayMetrics().heightPixels / 2);
|
return (up && onScroll(context, false));
|
||||||
return up;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!up)
|
if (!up)
|
||||||
|
@ -5009,6 +5009,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
fabMore.performClick();
|
fabMore.performClick();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean onScroll(Context context, boolean up) {
|
||||||
|
rvMessage.scrollBy(0, (up ? -1 : 1) *
|
||||||
|
context.getResources().getDisplayMetrics().heightPixels / 2);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue