diff options
Diffstat (limited to 'mail/mail-callbacks.c')
-rw-r--r-- | mail/mail-callbacks.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index 10e3c93b01..7850f9826c 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -449,8 +449,21 @@ delete_msg (GtkWidget *button, gpointer user_data) uids = g_ptr_array_new (); message_list_foreach (ml, enumerate_msg, uids); - mail_do_flag_messages (ml->folder, uids, TRUE, - CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED); + if (uids->len == 1) { + guint32 flags; + char *uid = uids->pdata[0]; + + mail_tool_camel_lock_up (); + flags = camel_folder_get_message_flags (ml->folder, uid); + camel_folder_set_message_flags (ml->folder, uid, + CAMEL_MESSAGE_DELETED, + ~flags); + mail_tool_camel_lock_down (); + } else { + mail_do_flag_messages (ml->folder, uids, TRUE, + CAMEL_MESSAGE_DELETED, + CAMEL_MESSAGE_DELETED); + } } void |