fix: ignore missing notification daemon

This commit is contained in:
atagen 2025-05-25 21:53:49 +10:00
parent 619876884d
commit 53d1f8d7fc

View File

@ -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 ()