Bug 1836986 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

For this we should use Bookmarks.fetchTags, I'd suggest to cache the result somehow, the bookmarks API can't cache it yet.
To unhide if a tag is added we could use the handleEvent in browser-places.
For this we should use Bookmarks.fetchTags, I'd suggest to cache the result somehow, the bookmarks API can't cache it yet.
To unhide if a tag is added we could use the handleEvent in browser-places.js
The scope of the bug is to show/hide the tags field depending on whether the user has ANY tags, so the first time the star dialog is shown we must use bookmarks.fetchTags to check if the user has any tags, and cache that information somewhere in browser-places.js. It may be in a boolean property maybe.
After that point, if the result is FALSE (no tags) we must keep this cached result up-to-date, in case the user adds a tag later. We can use the already existing PlacesObserver (handleEvent) implementation in browser-places, and detect when the user is adding a tag, then flip the boolean.
This avoids roundtrip to the database every time the dialog is opened.

Back to Bug 1836986 Comment 1