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

View File

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