mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-11 18:10:44 +00:00
Clear message field after sharing
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 <t@timkrueger.me>
This commit is contained in:
parent
f185ede417
commit
cf471e336f
@ -199,14 +199,13 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
private Bundle conversationMenuBundle = null;
|
private Bundle conversationMenuBundle = null;
|
||||||
|
|
||||||
private boolean showShareToScreen = false;
|
private boolean showShareToScreen = false;
|
||||||
private boolean shareToScreenWasShown = false;
|
|
||||||
|
|
||||||
private ArrayList<String> filesToShare;
|
private ArrayList<String> filesToShare;
|
||||||
private Conversation selectedConversation;
|
private Conversation selectedConversation;
|
||||||
|
|
||||||
private String textToPaste = "";
|
private String textToPaste = "";
|
||||||
|
|
||||||
private boolean forwardMessage = false;
|
private boolean forwardMessage;
|
||||||
|
|
||||||
private SmoothScrollLinearLayoutManager layoutManager;
|
private SmoothScrollLinearLayoutManager layoutManager;
|
||||||
|
|
||||||
@ -347,7 +346,7 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
|
|
||||||
searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
|
searchView = (SearchView) MenuItemCompat.getActionView(searchItem);
|
||||||
|
|
||||||
showShareToScreen = !shareToScreenWasShown && hasActivityActionSendIntent();
|
showShareToScreen = !showShareToScreen && hasActivityActionSendIntent();
|
||||||
|
|
||||||
|
|
||||||
if (showShareToScreen) {
|
if (showShareToScreen) {
|
||||||
@ -786,10 +785,11 @@ public class ConversationsListController extends BaseController implements Searc
|
|||||||
selectedConversation = getConversation(position);
|
selectedConversation = getConversation(position);
|
||||||
if (selectedConversation != null && getActivity() != null) {
|
if (selectedConversation != null && getActivity() != null) {
|
||||||
if (showShareToScreen) {
|
if (showShareToScreen) {
|
||||||
shareToScreenWasShown = true;
|
|
||||||
handleSharedData();
|
handleSharedData();
|
||||||
|
showShareToScreen = false;
|
||||||
} else if (forwardMessage) {
|
} else if (forwardMessage) {
|
||||||
openConversation(bundle.getString(BundleKeys.INSTANCE.getKEY_FORWARD_MSG_TEXT()));
|
openConversation(bundle.getString(BundleKeys.INSTANCE.getKEY_FORWARD_MSG_TEXT()));
|
||||||
|
forwardMessage = false;
|
||||||
} else {
|
} else {
|
||||||
openConversation();
|
openConversation();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user