Fixed outbox sync

This commit is contained in:
M66B
2019-02-27 14:06:10 +00:00
parent fe5d1b5d0b
commit a736035bc9
8 changed files with 46 additions and 22 deletions

View File

@@ -99,7 +99,7 @@ public class EntityOperation {
queue(context, db, message, name, jargs);
}
static void sync(DB db, long fid) {
static void sync(Context context, DB db, long fid) {
if (db.operation().getOperationCount(fid, EntityOperation.SYNC) == 0) {
EntityFolder folder = db.folder().getFolder(fid);
@@ -114,6 +114,9 @@ public class EntityOperation {
db.folder().setFolderSyncState(fid, "requested");
if (folder.account == null) // Outbox
context.startService(new Intent(context, ServiceSend.class));
Log.i("Queued sync folder=" + folder);
}
}