From 2a07bd74875bbecf3cf53659b19ecc24d6fef6e1 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Sat, 7 May 2022 15:34:17 +0200 Subject: [PATCH] Fixed notiModel compile warnings --- src/notiModel/notiModel.vala | 8 ++++---- src/notification/notification.vala | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/notiModel/notiModel.vala b/src/notiModel/notiModel.vala index 68cb194..ad6ba60 100644 --- a/src/notiModel/notiModel.vala +++ b/src/notiModel/notiModel.vala @@ -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 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 ac_array = new Array(); 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++; diff --git a/src/notification/notification.vala b/src/notification/notification.vala index 9f2609f..ddec32f 100644 --- a/src/notification/notification.vala +++ b/src/notification/notification.vala @@ -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) {