Remove some dead code in notification:reset_timeout()
This code is inside an "if new_timeout and [something else]". Thus, it only executes when new_timeout is "truthy". Thus, "new_timeout or [whatever]" will always evaluate to "new_timeout". This commit removes that tiny bit of dead code. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
dc98eade3b
commit
fb151c3340
|
@ -467,7 +467,7 @@ function notification:reset_timeout(new_timeout)
|
||||||
-- Do not set `self.timeout` to `self.timeout` since that would create the
|
-- Do not set `self.timeout` to `self.timeout` since that would create the
|
||||||
-- timer before the constructor ends.
|
-- timer before the constructor ends.
|
||||||
if new_timeout and self.timer then
|
if new_timeout and self.timer then
|
||||||
self.timeout = new_timeout or self.timeout
|
self.timeout = new_timeout
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.timer and not self.timer.started then
|
if self.timer and not self.timer.started then
|
||||||
|
|
Loading…
Reference in New Issue