Verified Commit 84d30c2d authored by Rinigus Saar's avatar Rinigus Saar Committed by Jonah Brüchert

decouple tabsmodel url from webview url

This commit makes it explicit when tabs model url is changing
url of the webview. Without such decoupling, it mobile google search
result was restored as a tab, clicking on search leads to change in url
and resets page back to its older state making it impossible
to a new enter search string
parent 897db27e
......@@ -45,6 +45,7 @@ Repeater {
isMobileDefault: Kirigami.Settings.isMobile
privateMode: privateTabsMode
Component.onCompleted: tabsModel.loadInitialTabs()
signal loadTabsModel()
}
delegate: WebView {
......@@ -54,7 +55,7 @@ Repeater {
top: tabs.top
}
privateMode: tabs.privateTabsMode
url: model.pageurl
url: "about:empty"
userAgent.isMobile: model.isMobile
width: tabs.width
......@@ -73,11 +74,18 @@ Repeater {
tabsModel.setUrl(index, url);
}
Component.onCompleted: url = model.pageurl
Connections {
target: webView.userAgent
onUserAgentChanged: {
tabsModel.setIsMobile(index, webView.userAgent.isMobile);
}
}
Connections {
target: tabs.model
onLoadTabsModel: url = model.pageurl
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment