Skip to content

Commit 590af31

Browse files
feat(@desktop/externalLinks): Updated the calls made to launch external
links to new api based on the new behaviour
1 parent b0a14fc commit 590af31

File tree

56 files changed

+114
-137
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+114
-137
lines changed

src/app/global/local_account_sensitive_settings.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const LAST_SECTION_CHAT = "LastSectionChat"
3636
const DEFAULT_ACTIVE_CHAT = ""
3737
const DEFAULT_SHOW_BROWSER_SELECTOR = true
3838
const LSS_KEY_OPEN_LINKS_IN_STATUS* = "openLinksInStatus"
39-
const DEFAULT_OPEN_LINKS_IN_STATUS = true
39+
const DEFAULT_OPEN_LINKS_IN_STATUS = false
4040
const LSS_KEY_SHOULD_SHOW_FAVORITES_BAR* = "shouldShowFavoritesBar"
4141
const DEFAULT_SHOULD_SHOW_FAVORITES_BAR = true
4242
const LSS_KEY_BROWSER_HOMEPAGE* = "browserHomepage"

storybook/pages/KeycardIntroPagePage.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ Item {
3030
displayPromoBanner: ctrlDisplayPromo.checked
3131
onEmptyKeycardDetected: console.warn("!!! EMPTY DETECTED")
3232
onNotEmptyKeycardDetected: console.warn("!!! NOT EMPTY DETECTED")
33-
onOpenLink: Qt.openUrlExternally(link)
34-
onOpenLinkWithConfirmation: Qt.openUrlExternally(link)
33+
onRequestOpenLink: Qt.openUrlExternally(link)
3534
onKeycardFactoryResetRequested: console.warn("!!! FACTORY RESET")
3635
onUnblockWithSeedphraseRequested: console.warn("!!! UNBLOCK WITH SEEDPHRASE")
3736
onUnblockWithPukRequested: console.warn("!!! UNBLOCK WITH PUK")

storybook/pages/PrivacyAndSecurityViewPage.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ SplitView {
2121
SplitView.fillHeight: true
2222
contentWidth: parent.width
2323

24+
privacySectionTitle: "Privacy"
2425
whitelistedDomainsModel: ["example1.com", "example2.com", "example3.com"]
2526
isStatusNewsViaRSSEnabled: true
2627
isCentralizedMetricsEnabled: true

storybook/pages/ProfileSocialLinksPanelPage.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ SplitView {
7373

7474
Connections {
7575
target: Global
76-
function onOpenLink(link) {
77-
logs.logEvent("Global::openLink", ["link"], [link])
76+
function onRequestOpenLink(link) {
77+
logs.logEvent("Global::onRequestOpenLink", ["link"], [link])
7878
}
7979
}
8080

storybook/qmlTests/tests/tst_BuyCryptoModal.qml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ Item {
112112
SignalSpy {
113113
id: notificationSpy
114114
target: Global
115-
signalName: "openLinkWithConfirmation"
115+
signalName: "requestOpenLink"
116116
}
117117

118118
TestCase {
@@ -250,7 +250,6 @@ Item {
250250
verify(controlUnderTest.rightButtons[0].loading)
251251
tryCompare(notificationSpy, "count", 1)
252252
compare(notificationSpy.signalArguments[0][0], "xxxx")
253-
compare(notificationSpy.signalArguments[0][1], modelData.hostname)
254253
notificationSpy.clear()
255254

256255
// popup should be closed
@@ -274,7 +273,6 @@ Item {
274273
verify(loadingIndicator.visible)
275274
tryCompare(notificationSpy, "count", 1)
276275
compare(notificationSpy.signalArguments[0][0], "xxxx")
277-
compare(notificationSpy.signalArguments[0][1], modelData.hostname)
278276
notificationSpy.clear()
279277

280278
// popup should be closed

storybook/qmlTests/tests/tst_SendSignModal.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Item {
129129
SignalSpy {
130130
id: signalSpyOpenLink
131131
target: Global
132-
signalName: "openLinkWithConfirmation"
132+
signalName: "requestOpenLink"
133133
}
134134

135135
property SendSignModal controlUnderTest: null

ui/StatusQ/src/StatusQ/Components/StatusDraggableListItem.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ import StatusQ.Core.Theme
8181
font.pixelSize: Theme.primaryTextFontSize
8282
font.weight: Font.Normal
8383
text: draggableDelegate.asideText
84-
onClicked: Global.openLink(model.url)
84+
onClicked: Global.requestOpenLink(model.url)
8585
},
8686
StatusFlatRoundButton {
8787
icon.name: "edit_pencil"

ui/app/AppLayouts/ActivityCenter/ActivityCenterLayout.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ StatusSectionLayout {
684684
id: newsMessagePopup
685685

686686
NewsMessagePopup {
687-
onLinkClicked: Global.openLinkWithConfirmation(link, StatusQUtils.StringUtils.extractDomainFromLink(link));
687+
onLinkClicked: Global.requestOpenLink(link)
688688
}
689689
}
690690

ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ RowLayout {
329329
break;
330330
}
331331
}
332-
onLinkActivated: Global.openLink(link)
332+
onLinkActivated: Global.requestOpenLink(link)
333333
}
334334
}
335335

ui/app/AppLayouts/Communities/controls/Options.qml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ ColumnLayout {
113113
text: qsTr("Learn more about token-gating")
114114
font.pixelSize: Theme.primaryTextFontSize
115115
normalColor: linkColor
116-
onClicked: Global.openLinkWithConfirmation(d.aboutPermissionsLink,
117-
StatusQUtils.StringUtils.extractDomainFromLink(d.aboutPermissionsLink))
116+
onClicked: Global.requestOpenLink(d.aboutPermissionsLink)
118117
}
119118

120119
StatusIcon {
@@ -127,8 +126,7 @@ ColumnLayout {
127126
anchors.fill: parent
128127
cursorShape: Qt.PointingHandCursor
129128

130-
onClicked: Global.openLinkWithConfirmation(d.aboutPermissionsLink,
131-
StatusQUtils.StringUtils.extractDomainFromLink(d.aboutPermissionsLink))
129+
onClicked: Global.requestOpenLink(d.aboutPermissionsLink)
132130
}
133131
}
134132
}
@@ -139,7 +137,7 @@ ColumnLayout {
139137
id: messageHistoryInfoPopupComponent
140138

141139
EnableFullMessageHistoryPopup {
142-
onAccepted: Global.openLinkWithConfirmation(d.aboutHistoryServiceLink, StatusQUtils.StringUtils.extractDomainFromLink(d.aboutHistoryServiceLink))
140+
onAccepted: Global.requestOpenLink(d.aboutHistoryServiceLink)
143141
onClosed: destroy()
144142
}
145143
}

0 commit comments

Comments
 (0)