From 2eb4508871626339a847ac0973cff118c9be567a Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Tue, 28 Jun 2022 20:26:58 +0200 Subject: [PATCH] refactor(n.notification): Make private method local --- lib/naughty/notification.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index 43ea0cbbf..cb4568981 100644 --- a/lib/naughty/notification.lua +++ b/lib/naughty/notification.lua @@ -524,7 +524,7 @@ function notification:set_id(new_id) end -function notification:die(reason) +local function die(self, reason) if reason == cst.notification_closed_reason.expired then self.is_expired = true if naughty.expiration_paused then @@ -555,7 +555,7 @@ function notification:set_timeout(timeout) local timer_die = timer { timeout = timeout } timer_die:connect_signal("timeout", function() - pcall(notification.die, self, cst.notification_closed_reason.expired) + pcall(die, self, cst.notification_closed_reason.expired) -- Prevent infinite timers events on errors. if timer_die.started then @@ -936,7 +936,7 @@ end -- @tparam[opt] func args.run Function to run on left click. The notification -- object will be passed to it as an argument. -- You need to call e.g. --- `notification.die(naughty.notification_closed_reason.dismissedByUser)` from +-- `notification:destroy(naughty.notification_closed_reason.dismissedByUser)` from -- there to dismiss the notification yourself. -- @tparam[opt] func args.destroy Function to run when notification is destroyed. -- @tparam[opt] table args.preset Table with any of the above parameters.