stop scrolling in tablet view after switching conversations

This commit is contained in:
Daniel Gultsch 2018-03-08 17:01:45 +01:00
parent a883faf05e
commit 216cf1805f
1 changed files with 2 additions and 1 deletions

View File

@ -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);