don't show share button before account is setup

This commit is contained in:
Daniel Gultsch 2016-12-01 13:07:18 +01:00
parent 168ad50ddd
commit 6e95ad4bdf

View file

@ -565,8 +565,11 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
final MenuItem renewCertificate = menu.findItem(R.id.action_renew_certificate); final MenuItem renewCertificate = menu.findItem(R.id.action_renew_certificate);
final MenuItem mamPrefs = menu.findItem(R.id.action_mam_prefs); final MenuItem mamPrefs = menu.findItem(R.id.action_mam_prefs);
final MenuItem changePresence = menu.findItem(R.id.action_change_presence); final MenuItem changePresence = menu.findItem(R.id.action_change_presence);
final MenuItem share = menu.findItem(R.id.action_share);
renewCertificate.setVisible(mAccount != null && mAccount.getPrivateKeyAlias() != null); renewCertificate.setVisible(mAccount != null && mAccount.getPrivateKeyAlias() != null);
share.setVisible(mAccount != null && !mInitMode);
if (mAccount != null && mAccount.isOnlineAndConnected()) { if (mAccount != null && mAccount.isOnlineAndConnected()) {
if (!mAccount.getXmppConnection().getFeatures().blocking()) { if (!mAccount.getXmppConnection().getFeatures().blocking()) {
showBlocklist.setVisible(false); showBlocklist.setVisible(false);