mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 23:26:12 +02:00
Added expunge operation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user