mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 00:53:26 +02:00
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user