From cf471e336f9f0a9623b224e75f551c190f2cf5a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Wed, 29 Sep 2021 12:13:38 +0200 Subject: [PATCH] Clear message field after sharing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After the Android sharing functionality was used, the shared text sticks in the message composing field in the conversation. Also if an text was forwared to the same conversation the text which was shared before sticks in the message composing field. Now the message composing field is empty after sharing or forwarding something. Signed-off-by: Tim Krüger --- .../talk/controllers/ConversationsListController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java index b6893539f..3c1e0a732 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java @@ -199,14 +199,13 @@ public class ConversationsListController extends BaseController implements Searc private Bundle conversationMenuBundle = null; private boolean showShareToScreen = false; - private boolean shareToScreenWasShown = false; private ArrayList filesToShare; private Conversation selectedConversation; private String textToPaste = ""; - private boolean forwardMessage = false; + private boolean forwardMessage; private SmoothScrollLinearLayoutManager layoutManager; @@ -347,7 +346,7 @@ public class ConversationsListController extends BaseController implements Searc searchView = (SearchView) MenuItemCompat.getActionView(searchItem); - showShareToScreen = !shareToScreenWasShown && hasActivityActionSendIntent(); + showShareToScreen = !showShareToScreen && hasActivityActionSendIntent(); if (showShareToScreen) { @@ -786,10 +785,11 @@ public class ConversationsListController extends BaseController implements Searc selectedConversation = getConversation(position); if (selectedConversation != null && getActivity() != null) { if (showShareToScreen) { - shareToScreenWasShown = true; handleSharedData(); + showShareToScreen = false; } else if (forwardMessage) { openConversation(bundle.getString(BundleKeys.INSTANCE.getKEY_FORWARD_MSG_TEXT())); + forwardMessage = false; } else { openConversation(); }