From 74b9f5fa4f0659fcf308724e9828ba2d12fc19d6 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sun, 27 Nov 2022 20:51:48 +0100 Subject: [PATCH] Make sure at most one layer is pushed from the menu BUG: 459738 --- src/qml/main.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qml/main.qml b/src/qml/main.qml index 08bde2f63..dc91302b4 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -238,13 +238,13 @@ Kirigami.ApplicationWindow { text: i18n("Explore rooms") icon.name: "compass" onTriggered: pushReplaceLayer("qrc:/JoinRoomPage.qml", {connection: Controller.activeConnection}) - enabled: pageStack.layers.currentItem.title !== i18n("Explore Rooms") && Controller.accountCount > 0 + enabled: pageStack.layers.depth === 1 && Controller.accountCount > 0 }, Kirigami.Action { text: i18n("Start a Chat") icon.name: "irc-join-channel" onTriggered: pushReplaceLayer("qrc:/StartChatPage.qml", {connection: Controller.activeConnection}) - enabled: pageStack.layers.currentItem.title !== i18n("Start a Chat") && Controller.accountCount > 0 + enabled: pageStack.layers.depth === 1 && Controller.accountCount > 0 }, Kirigami.Action { text: i18n("Create a Room") @@ -262,7 +262,7 @@ Kirigami.ApplicationWindow { onTriggered: pageStack.pushDialogLayer("qrc:/SettingsPage.qml", {}, { title: i18n("Configure") }) - enabled: pageStack.layers.currentItem.title !== i18n("Configure NeoChat...") + enabled: pageStack.layers.depth === 1 shortcut: StandardKey.Preferences }, Kirigami.Action {