skip animations for startup activities
This commit is contained in:
parent
d33fca09cf
commit
97406ecf51
|
@ -1207,17 +1207,22 @@ public class ConversationActivity extends XmppActivity
|
|||
mPostponedActivityResult = null;
|
||||
}
|
||||
|
||||
private void redirectToStartConversationActivity() {
|
||||
private void redirectToStartConversationActivity(boolean noAnimation) {
|
||||
Account pendingAccount = xmppConnectionService.getPendingAccount();
|
||||
if (pendingAccount == null) {
|
||||
Intent startConversationActivity = new Intent(this, StartConversationActivity.class);
|
||||
startConversationActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
if (noAnimation) {
|
||||
startConversationActivity.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
}
|
||||
startConversationActivity.putExtra("init", true);
|
||||
startActivity(startConversationActivity);
|
||||
if (noAnimation) {
|
||||
overridePendingTransition(0,0);
|
||||
}
|
||||
} else {
|
||||
switchToAccount(pendingAccount, true);
|
||||
return;
|
||||
}
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1241,20 +1246,23 @@ public class ConversationActivity extends XmppActivity
|
|||
Intent redirectionIntent = new Intent(this, ManageAccountActivity.class);
|
||||
redirectionIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
startActivity(redirectionIntent);
|
||||
overridePendingTransition(0,0);
|
||||
} else if (Config.MAGIC_CREATE_DOMAIN != null) {
|
||||
Intent redirectionIntent =new Intent(this, WelcomeActivity.class);
|
||||
redirectionIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
startActivity(redirectionIntent);
|
||||
overridePendingTransition(0,0);
|
||||
} else {
|
||||
Intent editAccount = new Intent(this, EditAccountActivity.class);
|
||||
editAccount.putExtra("init",true);
|
||||
editAccount.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
startActivity(editAccount);
|
||||
overridePendingTransition(0,0);
|
||||
}
|
||||
}
|
||||
} else if (conversationList.size() <= 0) {
|
||||
if (mRedirected.compareAndSet(false, true)) {
|
||||
redirectToStartConversationActivity();
|
||||
redirectToStartConversationActivity(true);
|
||||
}
|
||||
} else if (selectConversationByUuid(mOpenConversation)) {
|
||||
if (mPanelOpen) {
|
||||
|
@ -1819,7 +1827,7 @@ public class ConversationActivity extends XmppActivity
|
|||
}
|
||||
} else {
|
||||
if (!isStopping() && mRedirected.compareAndSet(false, true)) {
|
||||
redirectToStartConversationActivity();
|
||||
redirectToStartConversationActivity(false);
|
||||
}
|
||||
Log.d(Config.LOGTAG,"not updating conversations fragment because conversations list size was 0");
|
||||
}
|
||||
|
|
|
@ -526,6 +526,7 @@ public abstract class XmppActivity extends Activity {
|
|||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);
|
||||
}
|
||||
startActivity(intent);
|
||||
overridePendingTransition(0,0);
|
||||
}
|
||||
|
||||
protected void delegateUriPermissionsToService(Uri uri) {
|
||||
|
|
Loading…
Reference in New Issue