refactor(n.notification): Make private method local

This commit is contained in:
Lucas Schwiderski 2022-06-28 20:26:58 +02:00
parent 5950b62899
commit 2eb4508871
No known key found for this signature in database
GPG Key ID: AA12679AAA6DF4D8
1 changed files with 3 additions and 3 deletions

View File

@ -524,7 +524,7 @@ function notification:set_id(new_id)
end end
function notification:die(reason) local function die(self, reason)
if reason == cst.notification_closed_reason.expired then if reason == cst.notification_closed_reason.expired then
self.is_expired = true self.is_expired = true
if naughty.expiration_paused then if naughty.expiration_paused then
@ -555,7 +555,7 @@ function notification:set_timeout(timeout)
local timer_die = timer { timeout = timeout } local timer_die = timer { timeout = timeout }
timer_die:connect_signal("timeout", function() 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. -- Prevent infinite timers events on errors.
if timer_die.started then if timer_die.started then
@ -936,7 +936,7 @@ end
-- @tparam[opt] func args.run Function to run on left click. The notification -- @tparam[opt] func args.run Function to run on left click. The notification
-- object will be passed to it as an argument. -- object will be passed to it as an argument.
-- You need to call e.g. -- 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. -- there to dismiss the notification yourself.
-- @tparam[opt] func args.destroy Function to run when notification is destroyed. -- @tparam[opt] func args.destroy Function to run when notification is destroyed.
-- @tparam[opt] table args.preset Table with any of the above parameters. -- @tparam[opt] table args.preset Table with any of the above parameters.