mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
@@ -9,8 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed timer issue https://github.com/Textualize/textual/issues/2416
|
||||
- Fixed `textual run` issue https://github.com/Textualize/textual/issues/2391
|
||||
|
||||
|
||||
## [0.22.0] - 2023-04-27
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -131,16 +131,16 @@ class Timer:
|
||||
wait_time = max(0, next_timer - now)
|
||||
await sleep(wait_time)
|
||||
count += 1
|
||||
try:
|
||||
await self._tick(next_timer=next_timer, count=count)
|
||||
except EventTargetGone:
|
||||
break
|
||||
await self._active.wait()
|
||||
if self._reset:
|
||||
start = _time.get_time()
|
||||
count = 0
|
||||
self._reset = False
|
||||
continue
|
||||
try:
|
||||
await self._tick(next_timer=next_timer, count=count)
|
||||
except EventTargetGone:
|
||||
break
|
||||
|
||||
async def _tick(self, *, next_timer: float, count: int) -> None:
|
||||
"""Triggers the Timer's action: either call its callback, or sends an event to its target"""
|
||||
|
||||
Reference in New Issue
Block a user