diff options
Diffstat (limited to 'libmailutils')
-rw-r--r-- | libmailutils/base/amd.c | 10 | ||||
-rw-r--r-- | libmailutils/mailbox/message.c | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/libmailutils/base/amd.c b/libmailutils/base/amd.c index 96d55cc39..0bda6734b 100644 --- a/libmailutils/base/amd.c +++ b/libmailutils/base/amd.c @@ -900,7 +900,8 @@ amd_append_message (mu_mailbox_t mailbox, mu_message_t msg) char *qid; if (amd->cur_msg_file_name (mhm, &qid) == 0) { - mu_observable_notify (mailbox->observable, MU_EVT_MESSAGE_APPEND, + mu_observable_notify (mailbox->observable, + MU_EVT_MAILBOX_MESSAGE_APPEND, qid); free (qid); } @@ -1148,6 +1149,7 @@ amd_expunge (mu_mailbox_t mailbox) struct _amd_message *mhm; size_t i; int updated = amd->has_new_msg; + size_t expcount = 0; if (amd == NULL) return EINVAL; @@ -1175,9 +1177,15 @@ amd_expunge (mu_mailbox_t mailbox) if (amd->delete_msg) { + size_t expevt[2] = { i + 1, expcount }; rc = amd->delete_msg (amd, mhm); if (rc) return rc; + + mu_observable_notify (mailbox->observable, + MU_EVT_MAILBOX_MESSAGE_EXPUNGE, + expevt); + ++expcount; } else { diff --git a/libmailutils/mailbox/message.c b/libmailutils/mailbox/message.c index 644cd00bf..684fe39e4 100644 --- a/libmailutils/mailbox/message.c +++ b/libmailutils/mailbox/message.c @@ -534,9 +534,7 @@ mu_message_destroy (mu_message_t *pmsg, void *owner) is very unfortunate. The `owner' stuff is a leftover from older mailutils versions. - There is an ongoing attempt to remove it in the stream-cleanup - branch. When it is ready, it will be merged to the HEAD and this - will finally resolve this issue. */ + We are heading to removing it altogether. */ if (msg->ref > 0) msg->ref--; if ((msg->owner && msg->owner == owner) |