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
99a16e6467
commit
49774897a4
|
@ -139,6 +139,15 @@ function resume()
|
||||||
notifications.suspended = { }
|
notifications.suspended = { }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Toggle notification state
|
||||||
|
function toggle()
|
||||||
|
if suspended then
|
||||||
|
resume()
|
||||||
|
else
|
||||||
|
suspend()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Evaluate desired position of the notification by index - internal
|
-- Evaluate desired position of the notification by index - internal
|
||||||
-- @param idx Index of the notification
|
-- @param idx Index of the notification
|
||||||
-- @param position top_right | top_left | bottom_right | bottom_left
|
-- @param position top_right | top_left | bottom_right | bottom_left
|
||||||
|
|
Loading…
Reference in New Issue