zroya icon indicating copy to clipboard operation
zroya copied to clipboard

setExpiration() doesn't work

Open LucaAust opened this issue 6 years ago • 1 comments

I set the template expiration to 1000, but the notification will closed after 5-6 seconds. If i set the expiration to 10.000 the notification will closed after 5-6 seconds as well.

import time
import zroya


def _dismiss(action_id, reason):
    print(f"[_dismiss()] action_id: {action_id}")
    print(f"[_dismiss()] reason: {reason}")


def main():
    # Initialization is required
    zroya.init("asdf", "a", "b", "c", "1")

    template = zroya.Template(zroya.TemplateType.Text1)
    template.setExpiration(1000)

    zroya.show(template, on_dismiss=_dismiss)

    time.sleep(20)

if __name__ == '__main__':
    main()

I'm using python 3.7 with zroya 0.2.4.

LucaAust avatar Feb 28 '19 15:02 LucaAust

Hello, for me is same. Python 3.6.8, windows 10, setExpiration wont working and static closed after 5 seconds. And if try to use addAction then notification is permanent.

How to fix this? Thanks

romkazor avatar Mar 19 '19 17:03 romkazor