hotfix: unbreak opening URL in the builtin browser

The functions needs to stay at the toplevel to be accessible from
AppMain

Fixes: #7434
This commit is contained in:
Lukáš Tinkl 2022-09-19 16:57:59 +02:00 committed by Lukáš Tinkl
parent fb7989db55
commit 28ca3bd075
1 changed files with 7 additions and 8 deletions

View File

@ -29,6 +29,11 @@ StatusSectionLayout {
property var globalStore
property var sendTransactionModal
function openUrlInNewTab(url) {
var tab = _internal.addNewTab()
tab.item.url = _internal.determineRealURL(url)
}
onNotificationButtonClicked: Global.openActivityCenterPopup()
QtObject {
id: _internal
@ -141,12 +146,6 @@ StatusSectionLayout {
anchors.fill: parent
color: Style.current.inputBackground
function openUrlInNewTab(url) {
var tab = _internal.addNewTab()
tab.item.url = _internal.determineRealURL(url)
}
WebProviderObj {
id: provider
createAccessDialogComponent: function() {
@ -323,7 +322,7 @@ StatusSectionLayout {
FavoriteMenu {
id: favoriteMenu
openInNewTab: function (url) {
browserWindow.openUrlInNewTab(url)
root.openUrlInNewTab(url)
}
onEditFavoriteTriggered: {
Global.openPopup(addFavoriteModal, {
@ -614,7 +613,7 @@ StatusSectionLayout {
Connections {
target: browserSection
onOpenUrl: {
browserWindow.openUrlInNewTab(url);
root.openUrlInNewTab(url);
}
}
}