Added expunge operation

pull/194/head
M66B 4 years ago
parent 7491327cd4
commit ba75513ba1

@ -404,6 +404,7 @@ The low priority status bar notification shows the number of pending operations,
* *send*: send message
* *exists*: check if message exists
* *rule*: execute rule on body text
* *expunge*: permanently delete messages
Operations are processed only when there is a connection to the email server or when manually synchronizing.
See also [this FAQ](#user-content-faq16).

@ -409,6 +409,10 @@ class Core {
onPurgeFolder(context, jargs, folder, (IMAPFolder) ifolder);
break;
case EntityOperation.EXPUNGE:
onExpungeFolder(context, jargs, folder, (IMAPFolder) ifolder);
break;
case EntityOperation.RULE:
onRule(context, jargs, message);
break;
@ -1999,6 +2003,11 @@ class Core {
}
}
private static void onExpungeFolder(Context context, JSONArray jargs, EntityFolder folder, IMAPFolder ifolder) throws MessagingException {
Log.i(folder.name + " expunge");
ifolder.expunge();
}
private static void onPurgeFolder(Context context, EntityFolder folder) {
// POP3
DB db = DB.getInstance(context);

@ -43,6 +43,7 @@ public interface DaoOperation {
" WHEN operation.name = '" + EntityOperation.MOVE + "' THEN 5" +
" WHEN operation.name = '" + EntityOperation.PURGE + "' THEN 6" +
" WHEN operation.name = '" + EntityOperation.DELETE + "' THEN 7" +
" WHEN operation.name = '" + EntityOperation.EXPUNGE + "' THEN 8" +
" ELSE 0" +
" END";

@ -100,6 +100,7 @@ public class EntityOperation {
static final String EXISTS = "exists";
static final String RULE = "rule";
static final String PURGE = "purge";
static final String EXPUNGE = "expunge";
private static final int MAX_FETCH = 100; // operations

Loading…
Cancel
Save