|
|
@ -1789,8 +1789,6 @@ class Core {
|
|
|
|
|
|
|
|
|
|
|
|
private static void onPurgeFolder(Context context, JSONArray jargs, EntityFolder folder, IMAPFolder ifolder) throws MessagingException {
|
|
|
|
private static void onPurgeFolder(Context context, JSONArray jargs, EntityFolder folder, IMAPFolder ifolder) throws MessagingException {
|
|
|
|
// Delete all messages from folder
|
|
|
|
// Delete all messages from folder
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
final MessageSet[] sets = new MessageSet[]{new MessageSet(1, ifolder.getMessageCount())};
|
|
|
|
final MessageSet[] sets = new MessageSet[]{new MessageSet(1, ifolder.getMessageCount())};
|
|
|
|
|
|
|
|
|
|
|
@ -1810,15 +1808,12 @@ class Core {
|
|
|
|
Log.e(ex);
|
|
|
|
Log.e(ex);
|
|
|
|
throw ex;
|
|
|
|
throw ex;
|
|
|
|
} finally {
|
|
|
|
} finally {
|
|
|
|
int count = MessageHelper.getMessageCount(ifolder);
|
|
|
|
EntityOperation.sync(context, folder.id, false);
|
|
|
|
db.folder().setFolderTotal(folder.id, count < 0 ? null : count);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Delete local, hidden messages
|
|
|
|
|
|
|
|
onPurgeFolder(context, folder);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void onPurgeFolder(Context context, EntityFolder folder) {
|
|
|
|
private static void onPurgeFolder(Context context, EntityFolder folder) {
|
|
|
|
|
|
|
|
// POP3
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
DB db = DB.getInstance(context);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
db.beginTransaction();
|
|
|
|
db.beginTransaction();
|
|
|
|