From 2685730c4471c42d498293a557df31d8779a5b16 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Sun, 26 Jul 2026 18:49:14 +0200 Subject: [PATCH] fix(imports): let the manager step aside for the import it opens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .../java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt b/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt index def81c5..4000f7c 100644 --- a/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt +++ b/app/src/main/java/de/jeanlucmakiola/calendula/ui/CalendarHost.kt @@ -489,7 +489,12 @@ fun CalendarHost( ) { CalendarsScreen( 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 }, ) } }