From 41bc0820440eca9ed2993e5870dfd3a86943a701 Mon Sep 17 00:00:00 2001 From: miruka Date: Sun, 28 Feb 2021 15:05:33 -0400 Subject: [PATCH] PushRuleSettingsPopup: disable save if no rule ID --- src/gui/Popups/PushRuleSettingsPopup/GeneralRule.qml | 1 - src/gui/Popups/PushRuleSettingsPopup/PushRuleSettingsPopup.qml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/Popups/PushRuleSettingsPopup/GeneralRule.qml b/src/gui/Popups/PushRuleSettingsPopup/GeneralRule.qml index fcc82b5e..32e7bfd3 100644 --- a/src/gui/Popups/PushRuleSettingsPopup/GeneralRule.qml +++ b/src/gui/Popups/PushRuleSettingsPopup/GeneralRule.qml @@ -30,7 +30,6 @@ HColumnLayout { id: idField width: parent.width defaultText: rule.rule_id - // TODO: minimum length, check no dupe } } diff --git a/src/gui/Popups/PushRuleSettingsPopup/PushRuleSettingsPopup.qml b/src/gui/Popups/PushRuleSettingsPopup/PushRuleSettingsPopup.qml index 5d1534b1..dc5800bd 100644 --- a/src/gui/Popups/PushRuleSettingsPopup/PushRuleSettingsPopup.qml +++ b/src/gui/Popups/PushRuleSettingsPopup/PushRuleSettingsPopup.qml @@ -79,7 +79,7 @@ HFlickableColumnPopup { page.footer: AutoDirectionLayout { ApplyButton { text: qsTr("Save changes") - enabled: true // TODO + enabled: swipeView.currentItem.idField.text.trim() !== "" loading: saveFutureId !== "" onClicked: root.save() }