зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1254797 - Post: Ensure we ignore deleted sites in pinned query r=rnewman
Pinned sites should be deleted directly, however I'm not confident enough in my knowledge of sync to be certain that we won't end up with deleted pinned sites in our table. (We use normal bookmark deletion for removing pinned sites.) MozReview-Commit-ID: SSLDkSXWlI
This commit is contained in:
Родитель
1916a1090c
Коммит
2304a9088e
|
@ -713,7 +713,9 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
|
|||
suggestedGridLimit = Integer.parseInt(gridLimitParam, 10);
|
||||
}
|
||||
|
||||
final String pinnedSitesFromClause = "FROM " + TABLE_BOOKMARKS + " WHERE " + Bookmarks.PARENT + " == " + Bookmarks.FIXED_PINNED_LIST_ID;
|
||||
final String pinnedSitesFromClause = "FROM " + TABLE_BOOKMARKS + " WHERE " +
|
||||
Bookmarks.PARENT + " == " + Bookmarks.FIXED_PINNED_LIST_ID +
|
||||
" AND " + Bookmarks.IS_DELETED + " IS NOT 1";
|
||||
|
||||
// Ideally we'd use a recursive CTE to generate our sequence, e.g. something like this worked at one point:
|
||||
// " WITH RECURSIVE" +
|
||||
|
@ -925,8 +927,7 @@ public class BrowserProvider extends SharedBrowserDatabaseProvider {
|
|||
Bookmarks.POSITION + ", " +
|
||||
"NULL AS " + Combined.HISTORY_ID + ", " +
|
||||
TopSites.TYPE_PINNED + " as " + TopSites.TYPE +
|
||||
" FROM " + TABLE_BOOKMARKS +
|
||||
" WHERE " + Bookmarks.PARENT + " == " + Bookmarks.FIXED_PINNED_LIST_ID +
|
||||
" " + pinnedSitesFromClause +
|
||||
|
||||
" ORDER BY " + Bookmarks.POSITION,
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче