zroya
zroya copied to clipboard
setExpiration() doesn't work
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.
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