Skip to content

Commit

Permalink
Fixed ubports#456
Browse files Browse the repository at this point in the history
Save icon URL of tabs without QtWebEngine's favicon scheme and host
  • Loading branch information
kugiigi authored Jul 28, 2021
1 parent f15b0dc commit 12a3f34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/webbrowser/Browser.qml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,13 @@ Common.BrowserView {
state.uniqueId = tab.uniqueId
state.url = tab.url.toString()
state.title = tab.title
state.icon = tab.icon.toString()

if (UrlUtils.schemeIs(tab.icon, "image") && UrlUtils.hostIs(tab.icon, "favicon")) {
state.icon = tab.icon.toString().substring(("image://favicon/").length)
} else {
state.icon = tab.icon.toString()
}

state.preview = Qt.resolvedUrl(PreviewManager.previewPathFromUrl(tab.url))
state.savedState = tab.webview ? tab.webview.currentState : tab.restoreState
return state
Expand Down

0 comments on commit 12a3f34

Please sign in to comment.