Closed Bug 1633607 Opened 5 years ago Closed 5 years ago

Convert nsIAbListener events to observer service notifications

Categories

(MailNews Core :: Address Book, task)

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 77.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(2 files)

We already have some observer service notifications where nsIAbListener was inadequate. In this bug I'm going to add notifications for all of the other events, but not remove nsIAbListener yet because that is a rabbit hole I do not have time to go down.

This adds a method to MailServices.ab for easy retrieval of a directory when all you have is a UID.

Attachment #9143834 - Flags: review?(mkmelin+mozilla)
Attachment #9143837 - Flags: review?(mkmelin+mozilla)
Blocks: 1633620
Comment on attachment 9143837 [details] [diff] [review] 1633607-nsiablistener-observers-1.diff Review of attachment 9143837 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, r=mkmelin ::: mailnews/addrbook/jsaddrbook/AddrBookDirectory.jsm @@ +528,5 @@ > set dirName(value) { > let oldValue = this.dirName; > this.setLocalizedStringValue("description", value); > MailServices.ab.notifyItemPropertyChanged(this, "DirName", oldValue, value); > + Services.obs.notifyObservers(this, "addrbook-directory-updated"); Maybe you want to pass on "DirName" too?
Attachment #9143837 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9143834 - Flags: review?(mkmelin+mozilla) → review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/370823b8dff7
Add nsIAbManager.getDirectoryFromUID. r=mkmelin
https://hg.mozilla.org/comm-central/rev/69e91e0bc92c
Fire observer service notifications as well as nsIAbListener events. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 77.0
Blocks: 1633998
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: