Explorar o código

simplification

Rodja Trappe %!s(int64=3) %!d(string=hai) anos
pai
achega
41ba8c8bf3
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      nicegui/elements/notify.py

+ 1 - 4
nicegui/elements/notify.py

@@ -25,12 +25,9 @@ class Notify(Element):
             view.closeBtn = close_button
 
         super().__init__(view)
-        self.notify()
+        asyncio.get_event_loop().create_task(self.notify_async())
 
     async def notify_async(self):
         self.view.notify = True
         await self.wp.update()
         self.view.notify = False
-
-    def notify(self):
-        asyncio.get_event_loop().create_task(self.notify_async())