From 2b2ecbb44ec0a06e9c8c38fb2d476772365881ba Mon Sep 17 00:00:00 2001 From: kosyak Date: Mon, 5 Aug 2024 21:19:52 +0200 Subject: [PATCH] fix wired 'Hide offline' behavior --- .../conversations/ui/StartConversationActivity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index fe787e752..3d9bceb34 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -847,12 +847,22 @@ public class StartConversationActivity extends XmppActivity implements XmppConne filter(mSearchEditText.getText().toString()); } invalidateOptionsMenu(); + return true; case R.id.action_note_to_self: + if (xmppConnectionService == null) { + return true; + } + final List accounts = xmppConnectionService.getAccounts(); if (accounts.size() == 1) { + if (accounts.get(0).getSelfContact() == null) { + return true; + } + final Contact self = new Contact(accounts.get(0).getSelfContact()); openConversationForContact(self); } + return true; } return super.onOptionsItemSelected(item); }