mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1254797 - Post: Ensure we ignore deleted sites in pinned query r=rnewman, a=ritu
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:
parent
f70e7edd48
commit
353729fe04
@ -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" +
|
||||
@ -924,8 +926,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,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user