Closed Bug 132450 Opened 22 years ago Closed 20 years ago

remove unused viewString parameter from OnItemAdded method

Categories

(MailNews Core :: Backend, defect, P3)

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.1alpha

People

(Reporter: Bienvenu, Assigned: neil)

References

Details

Attachments

(2 files, 1 obsolete file)

This parameter is a left-over from the rdf in the thread pane days - we no
longer need this view parameter.
Severity: normal → minor
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.1alpha
OS: Windows 2000 → All
QA Contact: esther → stephend
Hardware: PC → All
Depends on: 226270
Attached patch Proposed patch (obsolete) — Splinter Review
Assignee: bienvenu → neil.parkwaycc.co.uk
Attachment #146089 - Flags: review?(bienvenu)
Comment on attachment 146089 [details] [diff] [review]
Proposed patch

I changed the first parameter of OnItemAdded/Removed to an nsIRDFResource to
simplify the consumers below.

>+  OnItemRemoved: function(parentItem, item) {
>+    if (parentItem.Value != gCurrentFolderUri)
>       return;
> 
>     var deletedMessageHdr = item.QueryInterface(Components.interfaces.nsIMsgDBHdr);
At this point item could be either a db header or a folder so this could
actually throw an exception. It looks as if it will get ignored but I think
I'll change this anyway.

>+nsresult nsMsgFolderDataSource::OnItemAddedOrRemoved(nsIRDFResource *parentItem, nsISupports *item, PRBool added)
> {
>+  nsCOMPtr<nsIRDFNode> itemNode(do_QueryInterface(item));
>+  if (itemNode)
>+  {
>+    NotifyObservers(parentItem, kNC_Child, itemNode, added, PR_FALSE);
>+  }
>+  return NS_OK;
> }
Again, as item should be either a folder (which will QI to an RDF node) or a db
header (which won't) I didn't think any of the other checks were necessary.
Attachment #146089 - Flags: review?(bienvenu) → review?
Comment on attachment 146089 [details] [diff] [review]
Proposed patch

ok, r=bienvenu with those changes, thx.
Attachment #146089 - Flags: review? → review+
IIRC the exception would be generated if a child folder was deleted while a
message in the parent folder was being displayed standalone.
Attachment #146089 - Attachment is obsolete: true
Attachment #146120 - Flags: superreview?(mscott)
Attachment #146120 - Flags: superreview?(mscott) → superreview+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attached patch Missed some :-[Splinter Review
Comment on attachment 146366 [details] [diff] [review]
Missed some :-[

I hope these last few are simple enough for r/sr.
Attachment #146366 - Flags: superreview?(bienvenu)
Attachment #146366 - Flags: review?(bienvenu)
Attachment #146366 - Flags: superreview?(bienvenu) → superreview+
Comment on attachment 146366 [details] [diff] [review]
Missed some :-[

yes, that's fine.
Attachment #146366 - Flags: review?(bienvenu) → review+
Resolved REALLYFIXED ;-)
http://lxr.mozilla.org/seamonkey/search?string=NotifyItemAdded

NotifyItemAdded
/mailnews/addrbook/src/nsAbBSDirectory.cpp, line 74 -- nsresult
nsAbBSDirectory::NotifyItemAdded(nsISupports *item)
/mailnews/addrbook/src/nsAbBSDirectory.cpp, line 147 -- NotifyItemAdded(childDir);
/mailnews/addrbook/src/nsAbBSDirectory.h, line 67 -- nsresult
NotifyItemAdded(nsISupports *item);
/mailnews/addrbook/src/nsAbMDBDirectory.cpp, line 193 -- nsresult
nsAbMDBDirectory::NotifyItemAdded(nsISupports *item)
/mailnews/addrbook/src/nsAbMDBDirectory.cpp, line 677 -- NotifyItemAdded(newList);
/mailnews/addrbook/src/nsAbMDBDirectory.cpp, line 837 -- rv =
NotifyItemAdded(cardSupports);
/mailnews/addrbook/src/nsAbMDBDirectory.cpp, line 981 -- // NotifyItemAdded (card);
/mailnews/addrbook/src/nsAbMDBDirectory.h, line 82 -- NS_IMETHOD
NotifyDirItemAdded(nsISupports *item) { return NotifyItemAdded(item);}
/mailnews/addrbook/src/nsAbMDBDirectory.h, line 116 -- nsresult
NotifyItemAdded(nsISupports *item);
/mailnews/base/public/nsIMsgFolder.idl, line 454 -- void NotifyItemAdded(in
nsISupports item);
/mailnews/base/util/nsMsgDBFolder.cpp, line 868 -- NotifyItemAdded(msgDBHdr);
/mailnews/base/util/nsMsgDBFolder.cpp, line 4025 -- nsresult
nsMsgDBFolder::NotifyItemAdded(nsISupports *item)
/mailnews/imap/src/nsImapMailFolder.cpp, line 934 -- NotifyItemAdded(child);
/mailnews/imap/src/nsImapMailFolder.cpp, line 7260 -- NotifyItemAdded(child);
/mailnews/local/src/nsLocalMailFolder.cpp, line 983 -- NotifyItemAdded(child);
/mailnews/local/src/nsLocalMailFolder.cpp, line 1348 --
parentFolder->NotifyItemAdded(newFolder);
/mailnews/local/src/nsLocalMailFolder.cpp, line 2109 --
NotifyItemAdded(newMsgFolder);
/mailnews/news/src/nsNewsFolder.cpp, line 580 -- NotifyItemAdded(child);
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: