Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1158020 - Allow deleting bookmarks from the UI #374

Closed
wants to merge 7 commits into from

Conversation

wesj
Copy link
Contributor

@wesj wesj commented Apr 24, 2015

Argh. This turns out to be more complex than it should be. The crux of the problem is a tiny little bug. When we query for the "root" bookmarks right now, we query for those with a parentGuid = nil (although I don't think we quite even do that). We then store them in a folder with guid = PLACES_FOLDER_GUID. Later, if you try to reload that cursor, we query for those with parentGuid = BookmarkRoots.PLACES_FOLDER_GUID, which returns nothing (because we don't actually store parents right now).

Some of these issues are just things that aren't hooked up (storing parents) but a bunch of them just stem from us conflating ids and guids. Neither of those need to actually ever be exposed anywhere anyway. This fixes that. i.e.

1.) Guids and IDs aren't exposed outside storage. You don't need to know about them.
2.) All the API's using guids are done away with. Guids are for sync AFAIK. We have stable ids in our DB, so we don't need 'em.
3.) We create a default "folder" for Places when the db is created. We needs it id so that everything that gets added (right now) can be put inside it. Parent can now never be null (even Places points to 0, which is a non-bookmark).
4.) We actually store the parent id when we add a bookmark.

@rnewman
Copy link
Contributor

rnewman commented May 5, 2015

I cherry-picked the UI stuff into rnewman/db. The rest is obsoleted by that branch. Sorry for the churn, wes!

@rnewman rnewman closed this May 5, 2015
isabelrios pushed a commit to isabelrios/firefox-ios that referenced this pull request Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants