Compare commits
2 Commits
48a5d83e8b
...
d4e3c49ef2
| Author | SHA1 | Date | |
|---|---|---|---|
| d4e3c49ef2 | |||
| d17da09572 |
+1
-1
Submodule src/modules/pluscampaign updated: 6122603115...97bdf8e8e3
+10
-10
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user