From e498068ef57e79b645378df668ab987edb0362f1 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Wed, 20 Dec 2023 19:11:09 +0100 Subject: [PATCH] Added back support for non-URI image-paths for notifications. Fixes #356 --- src/notification/notification.vala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/notification/notification.vala b/src/notification/notification.vala index 03df0af..9f8c5a3 100644 --- a/src/notification/notification.vala +++ b/src/notification/notification.vala @@ -680,8 +680,18 @@ namespace SwayNotificationCenter { var img_path_exists = File.new_for_uri ( param.image_path ?? "").query_exists (); + if (param.image_path != null && !img_path_exists) { + // Check if it's not a URI + img_path_exists = File.new_for_path ( + param.image_path ?? "").query_exists (); + } var app_icon_exists = File.new_for_uri ( app_icon_uri ?? "").query_exists (); + if (app_icon_uri != null && !img_path_exists) { + // Check if it's not a URI + app_icon_exists = File.new_for_path ( + app_icon_uri ?? "").query_exists (); + } // Get the image CSS corner radius in pixels int radius = 0;