forked from zauberzeug/nicegui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve consistency of ui.update and element.update
- Loading branch information
1 parent
0d7392c
commit afa3236
Showing
2 changed files
with
3 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,6 @@ | ||
from typing import List | ||
|
||
from . import globals | ||
from .elements.element import Element | ||
from .task_logger import create_task | ||
|
||
|
||
def update(self, *elements: List[Element]) -> None: | ||
if not (globals.loop and globals.loop.is_running()): | ||
return | ||
def update(self, *elements: Element) -> None: | ||
for element in elements: | ||
create_task(element.view.update()) | ||
element.update() |