mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-28 08:32:16 +01:00
Sync folders on manual sync
This commit is contained in:
@@ -99,15 +99,22 @@ 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 = folder.getSyncArgs().toString();
|
||||
operation.args = jargs.toString();
|
||||
operation.created = new Date().getTime();
|
||||
operation.id = db.operation().insertOperation(operation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user