Closed gosuwachu closed 10 months ago
I really like that the application will be able to trigger the refresh itself by creating a new BackgroundTraversal
with enough information to know how to integrate_traversal_events
in order to insert entries under a new root. Refresh should be no problem with that and fall right into place.
It also seems that TerminalApp
doesn't fulfil a purpose anymore and that its fields can be merged into AppState
without losing anything. This might then be helpful when initiating a new walk (as it requires WalkOptions
). But I leave that to you :).
It also seems that TerminalApp doesn't fulfil a purpose anymore and that its fields can be merged into AppState without losing anything. This might then be helpful when initiating a new walk (as it requires WalkOptions). But I leave that to you :).
I have thought the same thing, and was the first thing that I have tried to do when working on this change. However I have ran into ownership / borrow checker issues. I may give it another go.
Ups... all my messy commit "wip" history ended up being merged into main - I don't mind if you squash when landing the PR, but I will also try to remember to squash all the commits before sending stuff for review.
No worries about it - I was aware and chose to prefer the detailed step-by-step history over a single commit that hides the steps. Even though I appreciate more structure, it's by no means a requirement and … I have been doing the same for a long time.
StackedGit changed that to the better, but it comes with a little overhead that to me at least is worth it.
This PR refactors app initialisation so that:
Traversal
.RunningTraversal
.Traversal
gets updated by processing events from theRunningTraversal
inside the main event loop.This should enable in future to implement refresh logic by creating another
RunningTraversal
and updating parts of the tree (TBD how to exactly do that).Other than the above
AppState
andTerminalApp
have been moved to separate files.