1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-03 18:26:20 +00:00

Revert "Sync folders on manual sync"

This reverts commit 03cd7f927e.
This commit is contained in:
M66B 2019-02-28 09:39:04 +00:00
parent f6d810fab1
commit b4742a2072
4 changed files with 3 additions and 12 deletions

View file

@ -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);
}
}

View file

@ -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;

View file

@ -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);

View file

@ -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);
}
}