diff --git a/Fk/Logic.js b/Fk/Logic.js index 0b5577c4..f6652bb3 100644 --- a/Fk/Logic.js +++ b/Fk/Logic.js @@ -90,6 +90,7 @@ callbacks["EnterLobby"] = (jsonData) => { mainStack.pop(); } mainWindow.busy = false; + config.saveConf(); } callbacks["EnterRoom"] = (jsonData) => { diff --git a/Fk/Pages/Lobby.qml b/Fk/Pages/Lobby.qml index 47900f7a..810576a0 100644 --- a/Fk/Pages/Lobby.qml +++ b/Fk/Pages/Lobby.qml @@ -198,6 +198,7 @@ Item { onClicked: { toast.show("Goodbye."); mainStack.pop(); + config.saveConf(); Backend.quitLobby(); } } diff --git a/Fk/RoomElement/Dashboard.qml b/Fk/RoomElement/Dashboard.qml index 02be4b6d..33d392b5 100644 --- a/Fk/RoomElement/Dashboard.qml +++ b/Fk/RoomElement/Dashboard.qml @@ -388,7 +388,7 @@ RowLayout { unSelectAll(); disableSkills(); - const cards = handcardAreaItem.cards; + let cards = handcardAreaItem.cards; const toRemove = []; for (let c of cards) { toRemove.push(c.cid); diff --git a/Fk/main.qml b/Fk/main.qml index fbc2b78d..55a976c2 100644 --- a/Fk/main.qml +++ b/Fk/main.qml @@ -224,13 +224,21 @@ Window { title: realMainWin.title informativeText: qsTr("Are you sure to exit?") buttons: MessageDialog.Ok | MessageDialog.Cancel - onAccepted: { - mainWindow.closing = true; - config.winWidth = width; - config.winHeight = height; - config.saveConf(); - Backend.quitLobby(false); - realMainWin.close(); + onButtonClicked: function (button, role) { + switch (button) { + case MessageDialog.Ok: { + mainWindow.closing = true; + config.winWidth = width; + config.winHeight = height; + config.saveConf(); + Backend.quitLobby(false); + realMainWin.close(); + break; + } + case MessageDialog.Cancel: { + exitMessageDialog.close(); + } + } } }