Files
Mykhailo ShevchukandClaude Opus 5 b736944239 Loader: keep the Apps list alive so closing an app comes straight back to it (#1195)
* Loader: keep the Apps list alive so closing an app comes straight back to it

Closing an application launched from Apps flashed the loading spinner for as
long as the list took to come back. An application takes its own view port down
inside its own thread, the GUI then draws the next enabled view port below it,
and for anything launched from Apps that was this service's view holder, which
held a Loading view for the thread's whole life. Only afterwards did the loader
join the application's thread and free the FAP, after which the thread called
dialog_file_browser_show() again, which allocated a FileBrowser and re-read the
directory - a manifest and icon parse per .fap - before any of the list was
drawn.

The Apps menu now owns its FileBrowser and ViewHolder instead of calling the
dialogs service, and keeps the list view set for as long as Apps is open. The
list is what the GUI draws the moment an application's view port goes away, and
nothing is rebuilt or re-read on the way back. The Loading view is gone with it.

Selections and Back arrive as paths on a queue, because a ViewHolder callback
runs on the GUI thread and cannot wait for a launch. Each one carries its own
copy of the path, taken on the thread that writes it, so a second press cannot
rewrite the string while the first is being started.

file_browser's scroll timer now only asks for a redraw if the frame it last
asked for reached the screen. Its view stays entered while an application runs
on top of it, and a redraw request repaints the whole screen whatever is drawn
there.

Measured on an f7 with a 60 .fap folder: the list comes back in 23 ms with no
spinner frame committed, against about a second of rebuilding before; the
retained browser holds 13,488 bytes while an application runs; LoaderApplications
peaks at 320 of its 764 stack bytes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* CHANGELOG: Apps list no longer rebuilt on the way back from an app

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-11-02 16:31:43 +02:00
..
2024-07-15 20:02:45 +03:00
2024-07-15 20:02:45 +03:00
2026-09-03 22:57:04 +03:00
2026-09-03 22:57:04 +03:00