瀏覽代碼

don't delete notification too early after update

Falko Schindler 1 年之前
父節點
當前提交
482d8775e9
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      nicegui/elements/notification.py

+ 1 - 4
nicegui/elements/notification.py

@@ -76,10 +76,7 @@ class Notification(Element, component='notification.js'):
                 if not await self.client.run_javascript(query):
                     delete()
 
-            if timeout:
-                Timer(timeout, delete, once=True)
-            else:
-                Timer(1.0, try_delete)
+            Timer(1.0, try_delete)
 
     @property
     def message(self) -> str: