mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Fix account selection on import if file doesn't contain global settings
This commit is contained in:
parent
8d97287ffd
commit
4d11c80f65
@ -1297,13 +1297,19 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
|
||||
|
||||
boolean includeGlobals = mImportContents.globalSettings ? pos.get(0) : false;
|
||||
List<String> accountUuids = new ArrayList<String>();
|
||||
for (int i = 1; i < count; i++) {
|
||||
int start = mImportContents.globalSettings ? 1 : 0;
|
||||
for (int i = start; i < count; i++) {
|
||||
if (pos.get(i)) {
|
||||
accountUuids.add(mImportContents.accounts.get(i-1).uuid);
|
||||
accountUuids.add(mImportContents.accounts.get(i-start).uuid);
|
||||
}
|
||||
}
|
||||
|
||||
boolean overwrite = false; //TODO: get value from dialog
|
||||
/*
|
||||
* TODO: Think some more about this. Overwriting could change the store
|
||||
* type. This requires some additional code in order to work smoothly
|
||||
* while the app is running.
|
||||
*/
|
||||
boolean overwrite = false;
|
||||
|
||||
dialog.dismiss();
|
||||
new ImportAsyncTask(includeGlobals, accountUuids, overwrite, mEncryptionKey, mInputStream).execute();
|
||||
|
Loading…
Reference in New Issue
Block a user