mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-03 18:26:20 +00:00
parent
f6d810fab1
commit
b4742a2072
4 changed files with 3 additions and 12 deletions
|
@ -320,7 +320,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
|||
throw new IllegalArgumentException(context.getString(R.string.title_no_internet));
|
||||
} else {
|
||||
now = "connected".equals(account.state);
|
||||
EntityOperation.sync(context, db, fid, true);
|
||||
EntityOperation.sync(context, db, fid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -185,8 +185,6 @@ class Core {
|
|||
break;
|
||||
|
||||
case EntityOperation.SYNC:
|
||||
if (jargs.getBoolean(3))
|
||||
onSynchronizeFolders(context, account, istore, state);
|
||||
onSynchronizeMessages(context, jargs, account, folder, (IMAPFolder) ifolder, state);
|
||||
break;
|
||||
|
||||
|
|
|
@ -99,22 +99,15 @@ public class EntityOperation {
|
|||
}
|
||||
|
||||
static void sync(Context context, DB db, long fid) {
|
||||
sync(context, db, fid, false);
|
||||
}
|
||||
|
||||
static void sync(Context context, DB db, long fid, boolean folders) {
|
||||
if (db.operation().getOperationCount(fid, EntityOperation.SYNC) == 0) {
|
||||
|
||||
EntityFolder folder = db.folder().getFolder(fid);
|
||||
|
||||
JSONArray jargs = folder.getSyncArgs();
|
||||
jargs.put(folders);
|
||||
|
||||
EntityOperation operation = new EntityOperation();
|
||||
operation.folder = folder.id;
|
||||
operation.message = null;
|
||||
operation.name = SYNC;
|
||||
operation.args = jargs.toString();
|
||||
operation.args = folder.getSyncArgs().toString();
|
||||
operation.created = new Date().getTime();
|
||||
operation.id = db.operation().insertOperation(operation);
|
||||
|
||||
|
|
|
@ -531,7 +531,7 @@ public class FragmentMessages extends FragmentBase {
|
|||
nointernet = true;
|
||||
} else {
|
||||
now = "connected".equals(account.state);
|
||||
EntityOperation.sync(context, db, folder.id, true);
|
||||
EntityOperation.sync(context, db, folder.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue