don't show up navigation in startConversation when there are no open conversations

This commit is contained in:
Daniel Gultsch 2016-08-30 13:13:06 +02:00
parent af329eff46
commit d32cbcc70d

View File

@ -793,7 +793,9 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
} }
final Intent intent = getIntent(); final Intent intent = getIntent();
final ActionBar ab = getActionBar(); final ActionBar ab = getActionBar();
if (intent != null && intent.getBooleanExtra("init",false) && ab != null) { boolean init = intent != null && intent.getBooleanExtra("init", false);
boolean noConversations = xmppConnectionService.getConversations().size() == 0;
if ((init || noConversations) && ab != null) {
ab.setDisplayShowHomeEnabled(false); ab.setDisplayShowHomeEnabled(false);
ab.setDisplayHomeAsUpEnabled(false); ab.setDisplayHomeAsUpEnabled(false);
ab.setHomeButtonEnabled(false); ab.setHomeButtonEnabled(false);