nsIMsgFolderListener.folderDeleted notification should provide sub-folder notifications or happen prior to their deletion

RESOLVED DUPLICATE of bug 471932

Status

MailNews Core
Backend
RESOLVED DUPLICATE of bug 471932
10 years ago
9 years ago

People

(Reporter: asuth, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 years ago
Currently, deleting a folder that contains sub-folders will only result in a single folderDeleted notification for the folder that is deleted (but not for any of its children).  This notification is generated after all of the sub-children are removed (and the folder's storage deleted), which means that the receiver of the notification receives no information about the existence of the deleted sub-folders.

This can be addressed by moving the call to NotifyFolderDeleted in nsMsgDBFolder::PropagateDelete into nsMsgDBFolder::RecursiveDelete, with the prime candidate being immediately following the call to Delete (if it is performed).

Arguably, it might be even better semantics to provide the notification before the folder's storage is deleted, but that does risk getting into needing to introduce phases (can we delete this? we are going to delete this! we did delete this!)...

Comment 1

10 years ago
For some reason, doing NotifyFolderDeleted(this) after status=Delete() does not seem to work, but does work when it is before.
This was fixed a while ago by bug 471932.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 471932
You need to log in before you can comment on or make changes to this bug.