Allow empty name for actions (#272)

This commit is contained in:
slikie 2023-05-30 19:32:24 +08:00 committed by GitHub
parent 4153db39d4
commit d46833bbd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,15 +241,16 @@ namespace SwayNotificationCenter {
var action = new Action ();
action.identifier = actions[i];
action.name = actions[i + 1];
if (action.name != null && action.identifier != null
&& action.name != "" && action.identifier != "") {
if (action.name != null && action.identifier != null) {
string id = action.identifier.down ();
switch (id) {
case "default":
default_action = action;
break;
case "inline-reply":
if (action.name == "") {
action.name = "Reply";
}
inline_reply = action;
break;
default: