mirror of
https://github.com/1j01/textual-paint.git
synced 2025-01-03 04:16:48 +03:00
WIP on stepwise undo app lifecycle spaghetti code
This commit is contained in:
parent
961e9a1560
commit
74c3c49eb7
@ -81,14 +81,17 @@ async def replay_steps() -> None:
|
|||||||
assert app is not None, "app should be set by now"
|
assert app is not None, "app should be set by now"
|
||||||
# for event, offset, selector, index in steps:
|
# for event, offset, selector, index in steps:
|
||||||
# ...
|
# ...
|
||||||
|
if not steps:
|
||||||
|
return
|
||||||
pilot = Pilot(app)
|
pilot = Pilot(app)
|
||||||
await pilot._wait_for_screen()
|
# await pilot._wait_for_screen()
|
||||||
await async_exec(get_replay_code())
|
# await async_exec(get_replay_code())
|
||||||
|
|
||||||
def run() -> None:
|
def run() -> None:
|
||||||
global app, next_after_exit
|
global app, next_after_exit
|
||||||
def startup_and_replay() -> None:
|
def startup_and_replay() -> None:
|
||||||
global app, next_after_exit
|
global app, next_after_exit
|
||||||
|
next_after_exit = None # important to allowing you to exit; don't keep launching the app
|
||||||
app = PaintApp()
|
app = PaintApp()
|
||||||
app.on_event = on_event.__get__(app)
|
app.on_event = on_event.__get__(app)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user