on xenial help sign in
Stop the left edge tutorial from being shown when the bottom edge tutorial wants to be shown after receiving a call.
fc57df5Michael Terry
qml/Tutorial/TutorialContent.qml+3−1
@@ -88,7 +88,8 @@ Item {
88 hides: [launcher, panel.indicators]
88 hides: [launcher, panel.indicators]
89 paused: root.paused
89 paused: root.paused
90
90
91− isReady: !tutorialLeftLoader.skipped && !paused && !keyboardVisible
91+ isReady: !tutorialLeftLoader.skipped && !paused && !keyboardVisible &&
92+ !tutorialBottomLoader.shown && !tutorialBottomLoader.mightShow
92
93
93 // Use an idle timer here, because when constructed, all our isReady variables will be false.
94 // Use an idle timer here, because when constructed, all our isReady variables will be false.
94 // Qml needs a moment to copy their values from Tutorial.qml. So we idle it and recheck.
95 // Qml needs a moment to copy their values from Tutorial.qml. So we idle it and recheck.
@@ -277,6 +278,7 @@ Item {
277
278
278 skipped: tutorialBottomLoader.skipped
279 skipped: tutorialBottomLoader.skipped
279 isReady: !tutorialBottomLoader.skipped && !paused && !keyboardVisible &&
280 isReady: !tutorialBottomLoader.skipped && !paused && !keyboardVisible &&
281+ !tutorialLeftLoader.shown && !tutorialLeftLongLoader.shown &&
280 !tutorialTopLoader.shown && !tutorialRightLoader.shown &&
282 !tutorialTopLoader.shown && !tutorialRightLoader.shown &&
281 tutorialBottomLoader.mightShow &&
283 tutorialBottomLoader.mightShow &&
282 d.focusedApp.state === ApplicationInfoInterface.Running
284 d.focusedApp.state === ApplicationInfoInterface.Running
tests/qmltests/Tutorial/tst_Tutorial.qml+25
@@ -682,6 +682,31 @@ Rectangle {
682 verify(!tutorialLeft.paused);
682 verify(!tutorialLeft.paused);
683 }
683 }
684
684
685+ function test_dialerInterruptionWithNoOverlappingTutorials() {
686+ var tutorialLeft = findChild(shell, "tutorialLeft");
687+ var tutorialBottom = findChild(shell, "tutorialBottom");
688+ verify(tutorialLeft.shown);
689+
690+ // Start call, hiding left tutorial
691+ callManager.foregroundCall = phoneCall;
692+ tryCompare(tutorialLeft, "shown", false);
693+
694+ // Start dialer app
695+ ApplicationManager.startApplication("dialer-app");
696+ tryCompare(ApplicationManager, "focusedApplicationId", "dialer-app");
697+ verify(!tutorialBottom.shown);
698+
699+ // Dismiss call, bottom tutorial should appear
700+ callManager.foregroundCall = null;
701+ tryCompare(tutorialBottom, "shown", true);
702+ verify(!tutorialLeft.shown);
703+
704+ // Get rid of bottom tutorial, left should now be shown
705+ touchFlick(shell, halfWidth, shell.height, halfWidth, halfHeight);
706+ tryCompare(tutorialBottom, "shown", false);
707+ tryCompare(tutorialLeft, "shown", true);
708+ }
709+
685 function test_greeterInterruptsTutorial() {
710 function test_greeterInterruptsTutorial() {
686 var tutorialLeft = findChild(shell, "tutorialLeft");
711 var tutorialLeft = findChild(shell, "tutorialLeft");
687 verify(tutorialLeft.shown);
712 verify(tutorialLeft.shown);