26 lines
1.2 KiB
Diff
26 lines
1.2 KiB
Diff
From 0d5929b4bc3ca8c55a9e27121782efb19e4d829e Mon Sep 17 00:00:00 2001
|
|
From: Laurent Montel <montel@kde.org>
|
|
Date: Mon, 4 Sep 2023 19:03:06 +0000
|
|
Subject: [PATCH] Fix enable/disable save button when image.source is empty.
|
|
Otherwise it will crash
|
|
|
|
---
|
|
src/qml/Settings/EmoticonEditorPage.qml | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/qml/Settings/EmoticonEditorPage.qml b/src/qml/Settings/EmoticonEditorPage.qml
|
|
index c55e9178e..1f003d24e 100644
|
|
--- a/src/qml/Settings/EmoticonEditorPage.qml
|
|
+++ b/src/qml/Settings/EmoticonEditorPage.qml
|
|
@@ -119,8 +119,8 @@
|
|
MobileForm.FormButtonDelegate {
|
|
id: save
|
|
text: i18n("Save")
|
|
- icon.name: "document-save"
|
|
- enabled: !root.newEmoticon || (image.source && shortcode.text && description.text)
|
|
+ icon.name: "document-save"
|
|
+ enabled: !root.newEmoticon || (image.source.toString().length > 0 && shortcode.text && description.text)
|
|
onClicked: {
|
|
if (root.newEmoticon) {
|
|
model.addEmoticon(image.source, shortcode.text, description.text, emoticonType === EmoticonFormCard.Stickers ? "sticker" : "emoticon")
|