Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mcleinman committed Dec 19, 2024
1 parent bd30879 commit 699c4f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/ui/screens/settings/ViewLanguage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ MZViewBase {
objectName: "settingsLanguagesView"
readonly property string telemetryScreenId : "language"

Component.onCompleted: Glean.impression.languageScreen.record({screen:telemetryScreenId})
Component.onCompleted: {
console.log("Completed loading ViewLanguage");
Glean.impression.languageScreen.record({screen:telemetryScreenId});
console.log("And recorded telemetry");
}

//% "Language"
_menuTitle : qsTrId("vpn.settings.language")

function centerSelectedLanguage() {
console.log("Centering selected language")
for (let idx = 0; idx < repeater.count; idx++) {
const langItem = repeater.itemAt(idx);
if (langItem.isSelectedLanguage) {
Expand Down Expand Up @@ -86,6 +91,7 @@ MZViewBase {
checked: MZSettings.languageCode === ""
activeFocusOnTab: true
onClicked: {
console.log("Radio button clicked")
MZSettings.languageCode = ""
}

Expand Down Expand Up @@ -121,7 +127,10 @@ MZViewBase {

model: searchBar.getProxyModel()

Component.onCompleted: vpnFlickable.centerSelectedLanguage()
Component.onCompleted: {
console.log("Completed loading repeater");
vpnFlickable.centerSelectedLanguage();
}

delegate: ColumnLayout {
id: del
Expand All @@ -130,6 +139,7 @@ MZViewBase {
property bool isSelectedLanguage: delRadio.checked

function pushFocusToRadio() {
console.log("Pushing focus to radio");
delRadio.forceActiveFocus();
}

Expand Down
3 changes: 3 additions & 0 deletions src/ui/screens/settings/ViewPreferences.qml
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ MZViewBase {
imageRightSrc: "qrc:/nebula/resources/chevron.svg"
imageRightMirror: MZLocalizer.isRightToLeft
onClicked: {
console.log("Opening language settings")
Glean.interaction.languageSelected.record({screen:telemetryScreenId})
console.log("Telemetry recorded")
stackview.push("qrc:/qt/qml/Mozilla/VPN/screens/settings/ViewLanguage.qml")
console.log("Screen pushed")
}
visible: MZLocalizer.hasLanguages
}
Expand Down

0 comments on commit 699c4f7

Please sign in to comment.