From 216cf1805f5ebf7413f7239a34c1ecc914291a0d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 8 Mar 2018 17:01:45 +0100 Subject: [PATCH] stop scrolling in tablet view after switching conversations --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 7e701b498..4fe3cd389 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1781,6 +1781,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke if (this.activity == null || this.binding == null) { return false; } + stopScrolling(); Log.d(Config.LOGTAG, "reInit(hasExtras=" + Boolean.toString(hasExtras) + ")"); if (this.conversation.isRead() && hasExtras) { @@ -2157,7 +2158,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke } } - public void stopScrolling() { + private void stopScrolling() { long now = SystemClock.uptimeMillis(); MotionEvent cancel = MotionEvent.obtain(now, now, MotionEvent.ACTION_CANCEL, 0, 0, 0); binding.messagesView.dispatchTouchEvent(cancel);