notification: Allow nil to be set to the timeout to rmeove it

This commit is contained in:
Emmanuel Lepage Vallee 2019-07-15 16:25:49 -04:00
parent 84ae41422f
commit 78c616c358
1 changed files with 2 additions and 0 deletions

View File

@ -457,6 +457,8 @@ function notification:set_id(new_id)
end
function notification:set_timeout(timeout)
timeout = timeout or 0
local die = function (reason)
if reason == cst.notification_closed_reason.expired then
self.is_expired = true