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:
Anurag Priyam 2011-07-23 12:47:34 +05:30 committed by Uli Schlachter
parent 99a16e6467
commit 49774897a4
1 changed files with 9 additions and 0 deletions

View File

@ -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