diff options
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationsActivity.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java index 00d5e2a7c..a7d1db8e7 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java @@ -444,6 +444,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_conversations, menu); MenuItem qrCodeScanMenuItem = menu.findItem(R.id.action_scan_qr_code); + final MenuItem menuEditProfiles = menu.findItem(R.id.action_accounts); if (qrCodeScanMenuItem != null) { Fragment fragment = getFragmentManager().findFragmentById(R.id.main_fragment); boolean visible = getResources().getBoolean(R.bool.show_qr_code_scan) @@ -451,6 +452,11 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio && fragment instanceof ConversationsOverviewFragment; qrCodeScanMenuItem.setVisible(visible); } + if (xmppConnectionServiceBound && xmppConnectionService.getAccounts().size() == 1 && !xmppConnectionService.multipleAccounts()) { + menuEditProfiles.setTitle(R.string.mgmt_account_edit); + } else { + menuEditProfiles.setTitle(R.string.action_accounts); + } return super.onCreateOptionsMenu(menu); } |