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 f882477269
commit d9e4c1e866
1 changed files with 9 additions and 0 deletions

View File

@ -137,6 +137,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