Fix broken quit dialog transition to next app

This commit is contained in:
Cameron Gutman
2018-09-09 10:08:23 -07:00
parent 103625fbdd
commit b8169ae08b
+7 -3
View File
@@ -91,6 +91,8 @@ GridView {
if (runningIndex >= 0 && runningIndex !== index) { if (runningIndex >= 0 && runningIndex !== index) {
quitAppDialog.appName = appModel.getRunningAppName() quitAppDialog.appName = appModel.getRunningAppName()
quitAppDialog.segueToStream = true quitAppDialog.segueToStream = true
quitAppDialog.nextAppName = model.name
quitAppDialog.nextAppIndex = index
quitAppDialog.open() quitAppDialog.open()
return return
} }
@@ -140,8 +142,10 @@ GridView {
MessageDialog { MessageDialog {
id: quitAppDialog id: quitAppDialog
modality:Qt.WindowModal modality:Qt.WindowModal
property string appName : ""; property string appName : ""
property bool segueToStream : false property bool segueToStream : false
property string nextAppName: ""
property int nextAppIndex: 0
text:"Are you sure you want to quit " + appName +"? Any unsaved progress will be lost." text:"Are you sure you want to quit " + appName +"? Any unsaved progress will be lost."
standardButtons: StandardButton.Yes | StandardButton.No standardButtons: StandardButton.Yes | StandardButton.No
onYes: { onYes: {
@@ -150,8 +154,8 @@ GridView {
if (segueToStream) { if (segueToStream) {
// Store the session and app name if we're going to stream after // Store the session and app name if we're going to stream after
// successfully quitting the old app. // successfully quitting the old app.
params.nextAppName = model.name params.nextAppName = nextAppName
params.nextSession = appModel.createSessionForApp(index) params.nextSession = appModel.createSessionForApp(nextAppIndex)
} }
else { else {
params.nextAppName = null params.nextAppName = null