Don't show menu on create account screen

This commit is contained in:
Sam Whited 2014-12-23 17:12:52 -05:00
parent 7c02677531
commit 8a467e33dd
1 changed files with 3 additions and 0 deletions

View File

@ -329,11 +329,14 @@ public class EditAccountActivity extends XmppActivity implements OnAccountUpdate
getMenuInflater().inflate(R.menu.editaccount, menu); getMenuInflater().inflate(R.menu.editaccount, menu);
final MenuItem showQrCode = menu.findItem(R.id.action_show_qr_code); final MenuItem showQrCode = menu.findItem(R.id.action_show_qr_code);
final MenuItem showBlocklist = menu.findItem(R.id.action_show_block_list); final MenuItem showBlocklist = menu.findItem(R.id.action_show_block_list);
final MenuItem showMoreInfo = menu.findItem(R.id.action_server_info_show_more);
if (mAccount == null) { if (mAccount == null) {
showQrCode.setVisible(false); showQrCode.setVisible(false);
showBlocklist.setVisible(false); showBlocklist.setVisible(false);
showMoreInfo.setVisible(false);
} else if (mAccount.getStatus() != Account.State.ONLINE || !mAccount.getXmppConnection().getFeatures().blocking()) { } else if (mAccount.getStatus() != Account.State.ONLINE || !mAccount.getXmppConnection().getFeatures().blocking()) {
showBlocklist.setVisible(false); showBlocklist.setVisible(false);
showMoreInfo.setVisible(false);
} }
return true; return true;
} }