Purge after move/copy

pull/187/head
M66B 4 years ago
parent d8486845c9
commit 620ddc4e09

@ -2996,7 +2996,8 @@ class Core {
if (message.ui_hide && if (message.ui_hide &&
message.ui_snoozed == null && message.ui_snoozed == null &&
(message.ui_busy == null || message.ui_busy < new Date().getTime()) && (message.ui_busy == null || message.ui_busy < new Date().getTime()) &&
db.operation().getOperationCount(folder.id, message.id) == 0) { db.operation().getOperationCount(folder.id, message.id) == 0 &&
db.operation().getOperationCount(folder.id, EntityOperation.PURGE) == 0) {
update = true; update = true;
message.ui_hide = false; message.ui_hide = false;
Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " unhide"); Log.i(folder.name + " updated id=" + message.id + " uid=" + message.uid + " unhide");

@ -34,7 +34,6 @@ public interface DaoOperation {
" WHEN operation.name = '" + EntityOperation.ATTACHMENT + "' THEN -3" + " WHEN operation.name = '" + EntityOperation.ATTACHMENT + "' THEN -3" +
" WHEN operation.name = '" + EntityOperation.HEADERS + "' THEN -2" + " WHEN operation.name = '" + EntityOperation.HEADERS + "' THEN -2" +
" WHEN operation.name = '" + EntityOperation.RAW + "' THEN -2" + " WHEN operation.name = '" + EntityOperation.RAW + "' THEN -2" +
" WHEN operation.name = '" + EntityOperation.PURGE + "' THEN -2" +
" WHEN operation.name = '" + EntityOperation.SYNC + "' AND folder.account IS NULL THEN -1" + // Outbox " WHEN operation.name = '" + EntityOperation.SYNC + "' AND folder.account IS NULL THEN -1" + // Outbox
" WHEN operation.name = '" + EntityOperation.SYNC + "' AND folder.account IS NOT NULL THEN 1" + " WHEN operation.name = '" + EntityOperation.SYNC + "' AND folder.account IS NOT NULL THEN 1" +
// Other operations: add, delete, seen, answered, flag, keyword, label, subscribe, send // Other operations: add, delete, seen, answered, flag, keyword, label, subscribe, send
@ -42,6 +41,7 @@ public interface DaoOperation {
" WHEN operation.name = '" + EntityOperation.EXISTS + "' THEN 3" + " WHEN operation.name = '" + EntityOperation.EXISTS + "' THEN 3" +
" WHEN operation.name = '" + EntityOperation.MOVE + "' THEN 4" + " WHEN operation.name = '" + EntityOperation.MOVE + "' THEN 4" +
" WHEN operation.name = '" + EntityOperation.COPY + "' THEN 4" + " WHEN operation.name = '" + EntityOperation.COPY + "' THEN 4" +
" WHEN operation.name = '" + EntityOperation.PURGE + "' THEN 5" +
" ELSE 0" + " ELSE 0" +
" END"; " END";

@ -742,7 +742,7 @@ public class FragmentFolders extends FragmentBase {
db.endTransaction(); db.endTransaction();
} }
ServiceSynchronize.eval(context, "delete"); ServiceSynchronize.eval(context, "purge");
return null; return null;
} }

@ -7343,7 +7343,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
db.endTransaction(); db.endTransaction();
} }
ServiceSynchronize.eval(context, "delete"); ServiceSynchronize.eval(context, "purge");
return null; return null;
} }

Loading…
Cancel
Save