Fixed notiModel compile warnings

This commit is contained in:
Erik Reider
2022-05-07 15:34:17 +02:00
parent f848b57018
commit 2a07bd7487
2 changed files with 5 additions and 5 deletions

View File

@@ -98,14 +98,14 @@ namespace SwayNotificationCenter {
priv_value = value.clamp (0, 100);
}
}
private int ? priv_value { private get; private set; }
private int priv_value { private get; private set; }
public bool has_synch { public get; private set; }
// Custom hints
/** Disables scripting for notification */
public bool swaync_no_script { get; set; }
public Action[] actions { get; set; }
public Array<Action> actions { get; set; }
/** If the notification replaces another */
public bool replaces { get; set; }
@@ -134,7 +134,7 @@ namespace SwayNotificationCenter {
s_hints ();
Action[] ac_array = {};
Array<Action> ac_array = new Array<Action>();
if (actions.length > 1 && actions.length % 2 == 0) {
for (int i = 0; i < actions.length; i++) {
var action = new Action ();
@@ -146,7 +146,7 @@ namespace SwayNotificationCenter {
if (action.identifier.down () == "default") {
default_action = action;
} else {
ac_array += action;
ac_array.append_val (action);
}
}
i++;

View File

@@ -297,7 +297,7 @@ namespace SwayNotificationCenter {
if (param.actions.length == 0 || index >= param.actions.length) {
return;
}
action_clicked (param.actions[index]);
action_clicked (param.actions.index (index));
}
private void action_clicked (Action action, bool is_default = false) {