Closed Bug 492149 Opened 16 years ago Closed 16 years ago

deleting msg from smart folder causes hdr area to get cleared

Categories

(MailNews Core :: Backend, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Bienvenu, Assigned: Bienvenu)

References

(Depends on 2 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch proposed fix (obsolete) — Splinter Review
If you delete a message from a smart folder (or any cross-folder saved search), we hide the hdr pane, display the message body, and then show the hdr pane. The fix is to set m_deletingRows to true when deleting from a saved search, and to add the deleted indices to mIndicesToNoteChange.
Attachment #376511 - Flags: superreview?(bugzilla)
Attachment #376511 - Flags: review?(bugzilla)
Comment on attachment 376511 [details] [diff] [review] proposed fix > if (msgHdr) > RememberDeletedMsgHdr(msgHdr); >+ // if we are deleting rows, save off the view indices >+ if (m_deletingRows) >+ mIndicesToNoteChange.AppendElement(indices[i]); >+ > } The indentation in this function is weird, but that comment is definitely wrong ;-) > if (!deleteStorage) > rv = ProcessRequestsInOneFolder(window); > else > rv = ProcessRequestsInAllFolders(window); > return rv; > } Shouldn't you be setting m_deletingRows to false if either of these fail - in a similar way to nsMsgDBView::DeleteMessages ?
good catch about the failure case. I cleaned up the indentation in that method as well...
Attachment #376511 - Attachment is obsolete: true
Attachment #376710 - Flags: superreview?(bugzilla)
Attachment #376710 - Flags: review?(bugzilla)
Attachment #376511 - Flags: superreview?(bugzilla)
Attachment #376511 - Flags: review?(bugzilla)
Comment on attachment 376710 [details] [diff] [review] fix addressing Standard8's comments >+ // remember the deleted messages in case the user undoes the delete, >+ // and we want to restore the hdr to the view, even if it no >+ // longer matches the search criteria. >+ for (nsMsgViewIndex i = 0; i < (nsMsgViewIndex) numIndices; i++) nit: comment not indented quite right now. >+ { >+ nsCOMPtr<nsIMsgDBHdr> msgHdr; >+ (void) GetMsgHdrForViewIndex(indices[i],getter_AddRefs(msgHdr)); nit: space after comma please. r/sr=Standard8 with those fixed.
Attachment #376710 - Flags: superreview?(bugzilla)
Attachment #376710 - Flags: superreview+
Attachment #376710 - Flags: review?(bugzilla)
Attachment #376710 - Flags: review+
fix checked in with nits addressed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Depends on: 515400
Depends on: 1432537
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: