naughty: add helper function, toggle() - suspend/resume notifications
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
f882477269
commit
d9e4c1e866
|
@ -137,6 +137,15 @@ function resume()
|
|||
notifications.suspended = { }
|
||||
end
|
||||
|
||||
--- Toggle notification state
|
||||
function toggle()
|
||||
if suspended then
|
||||
resume()
|
||||
else
|
||||
suspend()
|
||||
end
|
||||
end
|
||||
|
||||
-- Evaluate desired position of the notification by index - internal
|
||||
-- @param idx Index of the notification
|
||||
-- @param position top_right | top_left | bottom_right | bottom_left
|
||||
|
|
Loading…
Reference in New Issue