gecko-dev/mobile
Grisha Kruglov eba14873a8 Bug 1319274 - Part 3: Allow pinning and unpinning of both Top Sites and Highlights r=ahunt
This commit introduces a special type of a pin, "Activity Stream pin".
It's identified by a fixed position of -1. Activity Stream pins are displayed inline
with top sites, at the very front. They are "non-positioned", as opposed to regular pins
which have a position on Top Sites grid. This approach was selected (as opposed to creating a
new kind of a "non-positioned pins bookmark folder") because it is simpler, does not
involve any migrations or sync changes, and is thus preferred in light of a moving
target that is the current vision for Activity Stream.

Two types of pins, regular ones and Activity Stream pins, are independent of each other.

Due to the fact that pins and bookmarks are almost the same thing, we can only figure our,
based on the underlying queries, the following ahead of time:
- pinned state of a pinned top site item (trivial case)
- pinned state of a non-pinned top site item (trivial case)
- bookmark state of a "bookmarked" hightlight item (trivial case)
- bookmark state of a non-pinned top site item

For all other combinations, states have to be looked up when user opens a context menu for an item.

MozReview-Commit-ID: 3KbOp9S4Pz7

--HG--
extra : rebase_source : a86893a235ee7c6c7d2215b9c8a3b56f986480a9
2016-12-14 16:23:40 -08:00
..
android Bug 1319274 - Part 3: Allow pinning and unpinning of both Top Sites and Highlights r=ahunt 2016-12-14 16:23:40 -08:00
locales Bug 1285281 - Update Qwant icon to our guidelines. r=florian 2016-07-18 13:57:59 -05:00