mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Fix broken quit dialog transition to next app
This commit is contained in:
+7
-3
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user