commit 94d5c91c70cf7559c48cf70fba40ac72c8dcaf7e
parent 731e59f8fed6fd689d337809933b03baa3bde58f
Author: Daniel Barlow <dan@telent.net>
Date: Sat, 12 Feb 2022 16:10:26 +0000
handle replace-id for updating notifications in-place
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/crier/crier.fnl b/crier/crier.fnl
@@ -88,8 +88,8 @@
(fn update-window []
(each [id widget (pairs notifications)]
- (if (not (widget:get_parent))
- (window.box:pack_start widget false false 5)))
+ (if (not (widget.widget:get_parent))
+ (window.box:pack_start widget.widget false false 5)))
(if (next notifications)
(window.window:show_all)
(window.window:hide)))
@@ -102,7 +102,7 @@
(fn delete-notification [id]
(let [widget (. notifications id)]
(tset notifications id nil)
- (window.box:remove widget)
+ (window.box:remove widget.widget)
(update-window)
false
))
@@ -162,7 +162,7 @@
lgi.GLib.PRIORITY_DEFAULT timeout #(delete-notification id)))
(update-notification-widget widget noti)
- (tset notifications id widget.widget)
+ (tset notifications id widget)
(update-window)
id))