mirror of https://github.com/M66B/FairEmail.git
Keep current primary account on import
This commit is contained in:
parent
99412f294f
commit
4363218b7b
|
@ -762,6 +762,8 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||||
Log.i("Imported answer=" + answer.name + " id=" + answer.id + " (" + id + ")");
|
Log.i("Imported answer=" + answer.name + " id=" + answer.id + " (" + id + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EntityAccount primary = db.account().getPrimaryAccount();
|
||||||
|
|
||||||
// Accounts
|
// Accounts
|
||||||
JSONArray jaccounts = jimport.getJSONArray("accounts");
|
JSONArray jaccounts = jimport.getJSONArray("accounts");
|
||||||
for (int a = 0; a < jaccounts.length(); a++) {
|
for (int a = 0; a < jaccounts.length(); a++) {
|
||||||
|
@ -770,6 +772,9 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||||
Long aid = account.id;
|
Long aid = account.id;
|
||||||
account.id = null;
|
account.id = null;
|
||||||
|
|
||||||
|
if (primary != null)
|
||||||
|
account.primary = false;
|
||||||
|
|
||||||
// Forward referenced
|
// Forward referenced
|
||||||
Long swipe_left = account.swipe_left;
|
Long swipe_left = account.swipe_left;
|
||||||
Long swipe_right = account.swipe_right;
|
Long swipe_right = account.swipe_right;
|
||||||
|
|
Loading…
Reference in New Issue