fix(imports): let the manager step aside for the import it opens

The manager is declared last in the host's overlay Box so it covers everything
that can open it. But the restore-from-backup path runs the other way: the
manager asks the host for the import screen and stayed up, so the import drew
behind it — the file picker returned and nothing appeared to happen, and back
closed the manager onto a stale import screen.

The two can't both be on top, so the manager closes as it hands over. Coming
back from the import lands on whatever opened the manager in the first place.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-26 18:49:14 +02:00
parent e710f930ca
commit 2685730c44

View File

@@ -489,7 +489,12 @@ fun CalendarHost(
) { ) {
CalendarsScreen( CalendarsScreen(
onBack = { showCalendars = false }, onBack = { showCalendars = false },
onImport = { importUri = it; importForceMany = true }, // The manager opens the import too (restore from backup), and
// that way round it has to step aside: declared above the import
// overlays, it would otherwise cover the screen it just asked
// for. Closing it hands the user back to whatever opened the
// manager once the import is done.
onImport = { importUri = it; importForceMany = true; showCalendars = false },
) )
} }
} }