Skip to content

Commit

Permalink
Bugfix FXIOS-5304 [v109] Fixes pinned sites no longer work from add t…
Browse files Browse the repository at this point in the history
…o shortcuts (#12579)
  • Loading branch information
Tarik Eshaq authored Dec 9, 2022
1 parent 90139a8 commit 6551207
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Storage/SQL/SQLiteHistory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ open class SQLiteHistory {
public func getSites(forURLs urls: [String]) -> Deferred<Maybe<Cursor<Site?>>> {
let inExpression = urls.joined(separator: "\",\"")
let sql = """
SELECT history.id AS historyID, history.url AS url, title, guid, iconID, iconURL, iconDate, iconType, iconWidth
FROM view_favicons_widest, history
WHERE history.id = siteID AND history.url IN (\"\(inExpression)\")
SELECT history.id AS historyID, history.url AS url, title, guid
FROM history
WHERE history.url IN (\"\(inExpression)\")
"""

let args: Args = []
Expand Down Expand Up @@ -457,8 +457,7 @@ extension SQLiteHistory: BrowserHistory {

public func getPinnedTopSites() -> Deferred<Maybe<Cursor<Site>>> {
let sql = """
SELECT * FROM pinned_top_sites LEFT OUTER JOIN view_favicons_widest ON
historyID = view_favicons_widest.siteID
SELECT * FROM pinned_top_sites
ORDER BY pinDate DESC
"""
return database.runQueryConcurrently(sql, args: [], factory: SQLiteHistory.iconHistoryMetadataColumnFactory)
Expand Down

0 comments on commit 6551207

Please sign in to comment.