From a04b7a1c0f9ac7d36e1723a1de03dd0295709c54 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 25 Apr 2019 12:27:38 +0200 Subject: [PATCH] keyboard event callbacks shoud run on ui thread. fixes #3441 --- .../eu/siacs/conversations/ui/ConversationFragment.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 314b8fe73..2bff31edb 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -2592,7 +2592,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke if (status == Account.State.ONLINE && conversation.setOutgoingChatState(ChatState.COMPOSING)) { service.sendChatState(conversation); } - updateSendButton(); + runOnUiThread(this::updateSendButton); } @Override @@ -2618,15 +2618,15 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke service.sendChatState(conversation); } if (storeNextMessage()) { - activity.onConversationsListItemUpdated(); + runOnUiThread(() -> activity.onConversationsListItemUpdated()); } - updateSendButton(); + runOnUiThread(this::updateSendButton); } @Override public void onTextChanged() { if (conversation != null && conversation.getCorrectingMessage() != null) { - updateSendButton(); + runOnUiThread(this::updateSendButton); } }