diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-03-30 22:15:44 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-03-30 22:15:44 +0200 |
commit | 048c6acf340c1225e7cfd295bb34412a62ea2f16 (patch) | |
tree | 0f8cce2d9a9ef5e74a26e40e5f97adcd246d2226 | |
parent | 20f74141e480fdbe774c66f17b94654ff55fcc38 (diff) |
don't show qr scan in conversation view
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index 32689ca7b..fe38445ea 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -251,12 +251,19 @@ public class ConversationActivity extends XmppActivity implements OnConversation @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_conversations, menu); + MenuItem qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code); + if (qrCodeScanMenuItem != null) { + Fragment fragment = getFragmentManager().findFragmentById(R.id.main_fragment); + boolean visible = getResources().getBoolean(R.bool.show_qr_code_scan) + && fragment != null + && fragment instanceof ConversationsOverviewFragment; + qrCodeScanMenuItem.setVisible(visible); + } return super.onCreateOptionsMenu(menu); } @Override public void onConversationSelected(Conversation conversation) { - Log.d(Config.LOGTAG, "selected " + conversation.getName()); openConversation(conversation, null); } |