Bug 1521706 - When a listener is passed to nsIMsgFolder.deleteMessages, notify it on completion; r=mkmelin
This commit is contained in:
Родитель
87ebb7c86a
Коммит
d1a0c81564
|
@ -2253,6 +2253,11 @@ NS_IMETHODIMP nsImapMailFolder::DeleteMessages(nsIArray *messages,
|
|||
database->DeleteMessages(srcKeyArray.Length(), srcKeyArray.Elements(), nullptr);
|
||||
EnableNotifications(allMessageCountNotifications, true);
|
||||
}
|
||||
if (listener)
|
||||
{
|
||||
listener->OnStartCopy();
|
||||
listener->OnStopCopy(NS_OK);
|
||||
}
|
||||
NotifyFolderEvent(kDeleteOrMoveMsgCompleted);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1138,8 +1138,14 @@ nsMsgLocalMailFolder::DeleteMessages(nsIArray *messages,
|
|||
if (!isMove && (deleteStorage || isTrashFolder))
|
||||
{
|
||||
nsCOMPtr<nsIMsgFolderNotificationService> notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID));
|
||||
if (notifier)
|
||||
notifier->NotifyMsgsDeleted(messages);
|
||||
if (notifier) {
|
||||
if (listener)
|
||||
{
|
||||
listener->OnStartCopy();
|
||||
listener->OnStopCopy(NS_OK);
|
||||
}
|
||||
notifier->NotifyMsgsDeleted(messages);
|
||||
}
|
||||
}
|
||||
|
||||
if (!deleteStorage && !isTrashFolder)
|
||||
|
|
|
@ -796,6 +796,12 @@ nsMsgNewsFolder::DeleteMessages(nsIArray *messages, nsIMsgWindow *aMsgWindow,
|
|||
NotifyFolderEvent(NS_SUCCEEDED(rv) ? kDeleteOrMoveMsgCompleted :
|
||||
kDeleteOrMoveMsgFailed);
|
||||
|
||||
if (listener)
|
||||
{
|
||||
listener->OnStartCopy();
|
||||
listener->OnStopCopy(NS_OK);
|
||||
}
|
||||
|
||||
(void) RefreshSizeOnDisk();
|
||||
|
||||
return NS_OK;
|
||||
|
|
|
@ -1000,7 +1000,7 @@ function async_delete_messages(aSynMessageSet) {
|
|||
folder.deleteMessages(xpcomHdrArray, null,
|
||||
/* delete storage */ true,
|
||||
/* is move? */ false,
|
||||
asyncCopyListener,
|
||||
null,
|
||||
/* do not allow undo, currently leaks */ false);
|
||||
}
|
||||
return true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче