From 37c3bdb8bfb9b02e479da6622cab9b5e2af7a2d5 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 10 Jun 2018 19:48:30 +0200 Subject: [PATCH] fall back to search in other tab on search enter --- .../siacs/conversations/ui/StartConversationActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index 6799d80d3..f42ea06b4 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -181,11 +181,17 @@ public class StartConversationActivity extends XmppActivity implements XmppConne if (contacts.size() == 1) { openConversationForContact((Contact) contacts.get(0)); return true; + } else if (contacts.size() == 0 && conferences.size() == 1) { + openConversationsForBookmark((Bookmark) conferences.get(0)); + return true; } } else { if (conferences.size() == 1) { openConversationsForBookmark((Bookmark) conferences.get(0)); return true; + } else if (conferences.size() == 0 && contacts.size() == 1) { + openConversationForContact((Contact) contacts.get(0)); + return true; } } SoftKeyboardUtils.hideSoftKeyboard(StartConversationActivity.this);