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