Open Bug 547452 Opened 12 years ago Updated 3 years ago

No event fires at completion of folder tree construction

Categories

(Thunderbird :: Mail Window Front End, enhancement)

enhancement
Not set
normal

Tracking

(blocking-thunderbird3.1 -)

Tracking Status
blocking-thunderbird3.1 --- -

People

(Reporter: eyalroz1, Unassigned)

Details

(Whiteboard: [addon API] )

Currently, the gFolderTreeView fires a mapRebuild event after creating the top-level folders in the tree. An event is also necessary after _restoreOpenStates() is run and all folders are in place. An example of the need for this is the restoration to the _rowMap array, after reconstruction, of additional fields in various elements. 

(I do this with my remove duplicate messages extension, which marks some folders as containing the dupe originals; the markings are in _mapRow, to avoid long lookups whenever folder properties need to be generated.)
Marking wanted as this seems to be needed by this add-on author (other add-ons might want this too).
blocking-thunderbird3.1: --- → ?
Whiteboard: [addon API]
I don't think this would block if it were the last bug standing, but it would be great to get.  I'm guessing it's a very small amount of work.  asuth/sid0, is my guess likely to be true?
Flags: wanted-thunderbird+
blocking-thunderbird3.1: ? → -
I was trying to add exactly such event in bug 1490639 :)
But it seems to us the "mapRebuild" event is fired only after the function runs to the end (and tree is fully built) as if the execution does not yield to other JS code (like addons) while the mode() is running so nobody can consume the "mapRebuild" before _restoreOpenStates().
Do you have a different experience?
Well, I did have a different experience, but that was 9 years ago. I frankly have not looked at this for a long time. I'll check and get back to you within a couple of weeks I hope.
You need to log in before you can comment on or make changes to this bug.