Qt: show home icons at once on start, and keep them when other apps change
Home app tiles waited for the full app list (every app listed and labelled over JNI, slow on a phone) before they showed, while widgets showed at once. The last app list is now kept and the home starts from it; nothing on home is hidden until the fresh list has loaded. A package change used to reload every icon on screen; now only that package's icons are drawn again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DPL5hiQsCq11CwCPnKPp9D
This commit is contained in:
7 files changed
+69
-32
No files matched your search
@@ -346,6 +346,19 @@ int main(int argc, char *argv[]) {
|
||||
js("loadHome()");
|
||||
eq(homeLabels(), "Gmail,Chrome,Phone", "the layout is saved");
|
||||
|
||||
// Starting again: the saved app list names the home tiles before the real list loads,
|
||||
// and nothing is hidden meanwhile.
|
||||
js("apps = []; appRow = ({}); loading = true; setApps(Host.savedApps())");
|
||||
eq(homeLabels(), "Gmail,Chrome,Phone", "home tiles come from the saved app list");
|
||||
js("apps = []; appRow = ({})");
|
||||
eq(js("hidden.some(h => h)"), false, "nothing is hidden before the list loads");
|
||||
js("loadApps()");
|
||||
// A changed package reloads only its own icons.
|
||||
emit backend.appsChanged(QStringLiteral("com.example.chrome"));
|
||||
settle(50);
|
||||
eq(js("gen('com.example.chrome/.MainActivity') + ',' + gen('com.example.gmail/.MainActivity')"), "1,0",
|
||||
"a changed app's icons reload, the rest stay");
|
||||
|
||||
// The WebView build's saved home merges in: new slots go after, unpinned.
|
||||
emit backend.legacyHome(QStringLiteral(
|
||||
"{\"ultra.home.n\":\"3\",\"ultra.home.str.0\":\"com.example.clock/.MainActivity\","
|
||||
|
||||
Reference in new issue
Block a user