Open Bug 1130726 Opened 10 years ago Updated 2 years ago

Address Book - adding number of contacts next to them

Categories

(Thunderbird :: Address Book, enhancement)

31 Branch
x86_64
Windows 8.1
enhancement

Tracking

(Not tracked)

People

(Reporter: marcoagpinto, Assigned: aceman)

Details

Attachments

(1 file)

Attached image How it should work
It would be great if next to each address book/list, it would be shown the number of contacts inside. See example screenshot.
Severity: normal → enhancement
I like this for the local ABs. Probably need to skip this for remote ABs like LDAP which usually don't display all their contacts, so we might not be able to get the full number.
Status: UNCONFIRMED → NEW
Ever confirmed: true
I think it could be done, but is should NOT need to enumerate all cards in each AB as that could be slow. The nsIABDirectory::CardCount method I'd also like to use in bug 1085674 would be useful here. I need to polish that code to work right on LDAP AB.
Assignee: nobody → acelists
@aceman: You only need to enumerate each AB once, then, only update it if changes are made to them (such as adding/removing contacts).
Yes, but that would be a lot more code and error-prone as you'd need to catch all places in the code doing that adding/removing. Today and in the future.
What about a flag variable to be used in all parts of the code? See: Global changed_ABs=#False Then, every place of the code that changes the ABs would change it to #True. Then, when opening the AB: If changed_ABs=#True count_contacts() changed_ABs=#False EndIf
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: