@@ -49,11 +49,9 @@ Item {
49 launcher: root.launcher
49 launcher: root.launcher
50 hides: [launcher, panel.indicators]
50 hides: [launcher, panel.indicators]
53− return AccountsService.demoEdgesCompleted.indexOf("left") == -1;
52+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") == -1
56− Component.onCompleted: if (tutorialLeft.isReady()) show()
54+ Component.onCompleted: if (tutorialLeft.isReady) show()
57 onFinished: AccountsService.markDemoEdgeCompleted("left")
55 onFinished: AccountsService.markDemoEdgeCompleted("left")
@@ -64,23 +62,21 @@ Item {
64 panel: root.panel
62 panel: root.panel
65 hides: [launcher, panel.indicators]
63 hides: [launcher, panel.indicators]
68− return AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
65+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
69− AccountsService.demoEdgesCompleted.indexOf("top") == -1;
66+ AccountsService.demoEdgesCompleted.indexOf("top") == -1
73 id: tutorialTopTimer
69 id: tutorialTopTimer
74 interval: 60000
70 interval: 60000
75− onTriggered: if (tutorialTop.isReady()) tutorialTop.show()
71+ onTriggered: if (tutorialTop.isReady) tutorialTop.show()
78 Connections {
74 Connections {
79 target: AccountsService
75 target: AccountsService
80− onDemoEdgesCompletedChanged: if (tutorialTop.isReady()) tutorialTopTimer.start()
76+ onDemoEdgesCompletedChanged: if (tutorialTop.isReady) tutorialTopTimer.start()
83− Component.onCompleted: if (tutorialTop.isReady()) tutorialTopTimer.start()
79+ Component.onCompleted: if (tutorialTop.isReady) tutorialTopTimer.start()
84 onFinished: AccountsService.markDemoEdgeCompleted("top")
80 onFinished: AccountsService.markDemoEdgeCompleted("top")
86 Connections {
82 Connections {
@@ -100,27 +96,25 @@ Item {
100 stage: root.stage
96 stage: root.stage
101 hides: [launcher, panel.indicators]
97 hides: [launcher, panel.indicators]
103− function isReady() {
104− return AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
99+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
105− AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
100+ AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
106− AccountsService.demoEdgesCompleted.indexOf("right") == -1 &&
101+ AccountsService.demoEdgesCompleted.indexOf("right") == -1 &&
107− ApplicationManager.count >= 3;
102+ ApplicationManager.count >= 3
111 id: tutorialRightTimer
105 id: tutorialRightTimer
112 interval: 3000
106 interval: 3000
113− onTriggered: if (tutorialRight.isReady()) tutorialRight.show()
107+ onTriggered: if (tutorialRight.isReady) tutorialRight.show()
116 Connections {
110 Connections {
117 target: AccountsService
111 target: AccountsService
118− onDemoEdgesCompletedChanged: if (tutorialRight.isReady()) tutorialRightTimer.start()
112+ onDemoEdgesCompletedChanged: if (tutorialRight.isReady) tutorialRightTimer.start()
121 Connections {
115 Connections {
122 target: ApplicationManager
116 target: ApplicationManager
123− onApplicationAdded: if (tutorialRight.isReady()) tutorialRight.show()
117+ onApplicationAdded: if (tutorialRight.isReady) tutorialRight.show()
126 onFinished: AccountsService.markDemoEdgeCompleted("right")
120 onFinished: AccountsService.markDemoEdgeCompleted("right")
@@ -141,33 +135,31 @@ Item {
141 anchors.fill: parent
135 anchors.fill: parent
142 hides: [launcher, panel.indicators]
136 hides: [launcher, panel.indicators]
144− function isReady() {
145− return AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
138+ readonly property bool isReady: AccountsService.demoEdgesCompleted.indexOf("left") != -1 &&
146− AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
139+ AccountsService.demoEdgesCompleted.indexOf("top") != -1 &&
147− AccountsService.demoEdgesCompleted.indexOf("right") != -1 &&
140+ AccountsService.demoEdgesCompleted.indexOf("right") != -1 &&
148− AccountsService.demoEdgesCompleted.indexOf("bottom") == -1 &&
141+ AccountsService.demoEdgesCompleted.indexOf("bottom") == -1 &&
149− // focused app is an app known to have a bottom edge
142+ // focused app is an app known to have a bottom edge
150− (ApplicationManager.focusedApplicationId == "dialer-app" ||
143+ (ApplicationManager.focusedApplicationId == "dialer-app" ||
151− ApplicationManager.focusedApplicationId == "webbrowser-app" ||
144+ ApplicationManager.focusedApplicationId == "webbrowser-app" ||
152− ApplicationManager.focusedApplicationId == "messaging-app" ||
145+ ApplicationManager.focusedApplicationId == "messaging-app" ||
153− ApplicationManager.focusedApplicationId == "camera-app" ||
146+ ApplicationManager.focusedApplicationId == "camera-app" ||
154− ApplicationManager.focusedApplicationId == "clock-app");
147+ ApplicationManager.focusedApplicationId == "clock-app")
158 id: tutorialBottomTimer
150 id: tutorialBottomTimer
159 interval: 3000
151 interval: 3000
160− onTriggered: if (tutorialBottom.isReady()) tutorialBottom.show()
152+ onTriggered: if (tutorialBottom.isReady) tutorialBottom.show()
163 Connections {
155 Connections {
164 target: AccountsService
156 target: AccountsService
165− onDemoEdgesCompletedChanged: if (tutorialBottom.isReady()) tutorialBottomTimer.start()
157+ onDemoEdgesCompletedChanged: if (tutorialBottom.isReady) tutorialBottomTimer.start()
168 Connections {
160 Connections {
169 target: ApplicationManager
161 target: ApplicationManager
170− onFocusedApplicationIdChanged: if (tutorialBottom.isReady()) tutorialBottom.show()
162+ onFocusedApplicationIdChanged: if (tutorialBottom.isReady) tutorialBottom.show()
173 onFinished: {
165 onFinished: {