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)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Bienvenu, Assigned: Bienvenu)
References
(Depends on 2 open bugs)
Details
Attachments
(1 file, 1 obsolete file)
3.17 KB,
patch
|
standard8
:
review+
standard8
:
superreview+
|
Details | Diff | 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 1•16 years ago
|
||
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 ?
Assignee | ||
Comment 2•16 years ago
|
||
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 3•16 years ago
|
||
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+
Assignee | ||
Comment 4•16 years ago
|
||
fix checked in with nits addressed.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•