From 525d9ce3bcffce200a16f2c820daccf292f0e00c Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Tue, 7 Jan 2025 13:29:14 +0100 Subject: [PATCH] Comment out app shutdown on Android, because it needs more thought --- backend/FwLite/FwLiteMaui/MauiProgram.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/FwLite/FwLiteMaui/MauiProgram.cs b/backend/FwLite/FwLiteMaui/MauiProgram.cs index bee43d173..307ed8076 100644 --- a/backend/FwLite/FwLiteMaui/MauiProgram.cs +++ b/backend/FwLite/FwLiteMaui/MauiProgram.cs @@ -55,7 +55,12 @@ public static MauiApp CreateMauiApp() { #if ANDROID events.AddAndroid(android => android - .OnDestroy((activity) => holder.Shutdown())); + .OnDestroy((activity) => + { + // This doesn't work, because OnDestroy gets called e.g. when logging in via OAuth. (and maybe whenever the app is backgrounded?) + // It seems like there is no appropriate hook. Maybe we're just supposed to let the OS kill the app? + //holder.Shutdown(); + })); #endif #if IOS || MACCATALYST events.AddiOS(ios => ios