ancestorak/brief — pull request #28 by ancestorak (2013-09-05 23:17:51+00:00)
Title: Bookmark observer API changes broke tracking of tag removal

Obsoletion of nsIBookmarkObserver.onBeforeItemRemoved() broke the way Brief tracks tags. To check if the removed item was a tag, Brief checks if its parent is a tag folder, but the parent is already unavailable in nsIBookmarkObserver.onItemRemoved() if the last tag was removed.

To work around this, Brief has to store IDs of tag items, in addition to tag names. We can then check if an item was a tag without looking up the parent. This requires changing the database schema to accommodate a
tagID in entry_tags table (a columns that used to be there, curiously enough, but was later deemed unnecessary).

@Tanriol, this is a fairly delicate patch so it's always better to have a another pair of eyes. Do you have any input?