Auto hide answer for web view scrolling

This commit is contained in:
M66B
2023-04-07 12:44:37 +02:00
parent f209c689ce
commit fb38edfb1f
3 changed files with 21 additions and 10 deletions

View File

@@ -26,6 +26,8 @@ import static android.text.format.DateUtils.FORMAT_SHOW_DATE;
import static android.text.format.DateUtils.FORMAT_SHOW_WEEKDAY;
import static android.view.KeyEvent.ACTION_DOWN;
import static android.view.KeyEvent.ACTION_UP;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static androidx.recyclerview.widget.RecyclerView.NO_POSITION;
import static org.openintents.openpgp.OpenPgpSignatureResult.RESULT_KEY_MISSING;
import static org.openintents.openpgp.OpenPgpSignatureResult.RESULT_NO_SIGNATURE;
@@ -2480,7 +2482,16 @@ public class FragmentMessages extends FragmentBase
}
@Override
public void setPosition(long id, Pair<Integer, Integer> position) {
public void setPosition(long id, Pair<Integer, Integer> delta, Pair<Integer, Integer> position) {
if (delta != null && delta.second != 0) {
boolean down = (delta.second > 0);
if (scrolling != down) {
scrolling = down;
updateCompose();
updateExpanded();
}
}
if (position == null)
positions.remove(id);
else