From 53d1f8d7fca82e40d07ce336076ad44cba9ff46d Mon Sep 17 00:00:00 2001 From: atagen Date: Sun, 25 May 2025 21:53:49 +1000 Subject: [PATCH] fix: ignore missing notification daemon --- lib/smooooth.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/smooooth.ml b/lib/smooooth.ml index c6f263d..61128e3 100644 --- a/lib/smooooth.ml +++ b/lib/smooooth.ml @@ -5,14 +5,16 @@ let ( <| ) = ( @@ ) let send_noti noti ~body ~icon = - let* new_noti = + Lwt.catch + (fun () -> let* new_noti = match !noti with | Some n -> Notification.notify ~replace:n ~summary:"smooooth" ~body ~icon () | None -> Notification.notify ~summary:"smooooth" ~body ~icon () in noti := Some new_noti; - Lwt.return_unit + Lwt.return_unit) + (fun _ -> Lwt.return_unit) let silence silent f = if silent then Lwt.return_unit else f ()