Closed Bug 456264 Opened 16 years ago Closed 15 years ago

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

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 471932

People

(Reporter: asuth, Unassigned)

Details

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!)...
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
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.