From 982bdf5c98ebfd04330e4a1b1c429c9a62904ff9 Mon Sep 17 00:00:00 2001 From: RebeccaStankus Date: Mon, 23 Sep 2019 16:08:14 -0700 Subject: [PATCH] Prereq work for 'Reduce User Friction' --- .../qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml | 5 ++++- scripts/simplifiedUI/ui/simplifiedUI.js | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml index 427e45abba..c92da7e6e5 100644 --- a/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml +++ b/interface/resources/qml/hifi/simplifiedUI/topBar/SimplifiedTopBar.qml @@ -40,6 +40,9 @@ Rectangle { property bool inventoryFullyReceived: false Component.onCompleted: { + var numTimesRun = Settings.getValue("simplifiedUI/SUIScriptExecutionCount", 0); + numTimesRun++; + Settings.setValue("simplifiedUI/SUIScriptExecutionCount", numTimesRun); Commerce.getLoginStatus(); } @@ -52,7 +55,7 @@ Rectangle { if ((MyAvatar.skeletonModelURL.indexOf("defaultAvatar") > -1 || MyAvatar.skeletonModelURL.indexOf("fst") === -1) && topBarInventoryModel.count > 0) { Settings.setValue("simplifiedUI/alreadyAutoSelectedAvatar", true); - MyAvatar.skeletonModelURL = topBarInventoryModel.get(0).download_url; + MyAvatar.useFullAvatarURL = topBarInventoryModel.get(0).download_url; } } } diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js index affa6896d8..f1f1dd6dd3 100644 --- a/scripts/simplifiedUI/ui/simplifiedUI.js +++ b/scripts/simplifiedUI/ui/simplifiedUI.js @@ -532,6 +532,11 @@ function onGeometryChanged(rect) { } } +function onWindowMinimizedChanged() { + // prerequisite placeholder for Reduce Friction of Customer Acquisition sub task: https://highfidelity.atlassian.net/browse/DEV-585 + print("WINDOW MINIMIZED CHANGED SIGNAL"); +} + function onDisplayModeChanged(isHMDMode) { if (isHMDMode) { Camera.setModeString("first person"); @@ -612,6 +617,7 @@ function startup() { Audio.mutedDesktopChanged.connect(onDesktopInputDeviceMutedChanged); Audio.mutedHMDChanged.connect(onHMDInputDeviceMutedChanged); Window.geometryChanged.connect(onGeometryChanged); + Window.minimizedChanged.connect(onWindowMinimizedChanged); HMD.displayModeChanged.connect(onDisplayModeChanged); Audio.avatarGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); Audio.localInjectorGainChanged.connect(maybeUpdateOutputDeviceMutedOverlay); @@ -657,6 +663,7 @@ function shutdown() { Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged); Audio.mutedHMDChanged.disconnect(onHMDInputDeviceMutedChanged); Window.geometryChanged.disconnect(onGeometryChanged); + Window.minimizedChanged.disconnect(onWindowMinimizedChanged); HMD.displayModeChanged.disconnect(onDisplayModeChanged); Audio.avatarGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay); Audio.localInjectorGainChanged.disconnect(maybeUpdateOutputDeviceMutedOverlay);