Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 390f989b authored by kaiyiz's avatar kaiyiz Committed by Roman Birg
Browse files

Contacts: Show the new added account timely in account list

The new account has been created successfully, but it isn't shown timely.

Show the new added account timely in account list.

CRs-Fixed: 672510

Change-Id: I798fdf2abe92e79ac8c586e65249711571036278
parent b9788604
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -140,6 +140,12 @@ public class ContactEditorAccountsChangedActivity extends Activity {
            // If the user canceled the account setup process, then keep this activity visible to
            // the user.
            if (resultCode != RESULT_OK) {
                // refresh the account list when come back
                if (mAccountListView != null) {
                    mAccountListAdapter = new AccountsListAdapter(this,
                            AccountListFilter.ACCOUNTS_CONTACT_WRITABLE);
                    mAccountListView.setAdapter(mAccountListAdapter);
                }
                return;
            }
            // Subactivity was successful, so pass the result back and finish the activity.
@@ -157,11 +163,6 @@ public class ContactEditorAccountsChangedActivity extends Activity {
        // Save this as the default account
        mEditorUtils.saveDefaultAndAllAccounts(account);

        if (mAccountListView != null) {
            mAccountListAdapter = new AccountsListAdapter(this,
                    AccountListFilter.ACCOUNTS_CONTACT_WRITABLE);
            mAccountListView.setAdapter(mAccountListAdapter);
        }
        // Pass account info in activity result intent
        Intent intent = new Intent();
        intent.putExtra(Intents.Insert.ACCOUNT, account);