From d4e3c49ef2276d8627cb4c242f0f7a124a692888 Mon Sep 17 00:00:00 2001 From: Interitio Date: Fri, 31 Jul 2026 13:28:06 +0300 Subject: [PATCH] fix(utils): Update _View to _BaseView for hidden --- src/utils/ui/leo.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/utils/ui/leo.py b/src/utils/ui/leo.py index f867d2c..e8ea907 100644 --- a/src/utils/ui/leo.py +++ b/src/utils/ui/leo.py @@ -138,7 +138,7 @@ class LeoUI(View): to include a pre_timeout task which may optionally refresh and hence cancel the timeout. """ - if self._View__stopped.done(): + if self._BaseView__stopped.done(): # We are already stopped, nothing to do return @@ -160,17 +160,17 @@ class LeoUI(View): # The timeout was removed entirely, silently walk away return - if self._View__stopped.done(): + if self._BaseView__stopped.done(): # We stopped while waiting for the pre timeout. # Or maybe another thread timed us out # Either way, we are done here return now = time.monotonic() - if self._View__timeout_expiry is not None and now < self._View__timeout_expiry: + if self._BaseView__timeout_expiry is not None and now < self._BaseView__timeout_expiry: # The timeout was extended, make sure the timeout task is running then fade away - if self._View__timeout_task is None or self._View__timeout_task.done(): - self._View__timeout_task = asyncio.create_task(self._View__timeout_task_impl()) + if self._BaseView__timeout_task is None or self._BaseView__timeout_task.done(): + self._BaseView__timeout_task = asyncio.create_task(self._BaseView__timeout_task_impl()) else: # Actually timeout, and call the post-timeout task for cleanup. self._really_timeout() @@ -189,14 +189,14 @@ class LeoUI(View): This copies View._dispatch_timeout, apart from the `on_timeout` dispatch, which is now handled by `__dispatch_timeout`. """ - if self._View__stopped.done(): + if self._BaseView__stopped.done(): return - if self._View__cancel_callback: - self._View__cancel_callback(self) - self._View__cancel_callback = None + if self._BaseView__cancel_callback: + self._BaseView__cancel_callback(self) + self._BaseView__cancel_callback = None - self._View__stopped.set_result(True) + self._BaseView__stopped.set_result(True) def _dispatch_item(self, *args, **kwargs): """Extending event dispatch to run in the instantiation context."""