From 2a94a09cea8c01840aa3ff314462e8668228c0f8 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 31 Oct 2023 18:40:10 +0100 Subject: [PATCH] Properly exit --- app/src/main/java/eu/faircode/email/FragmentSetup.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index d7cba814eb..8a4409dd39 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -531,7 +531,11 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS btnInbox.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - ((FragmentBase) getParentFragment()).finish(); + FragmentActivity activity = getActivity(); + if (activity instanceof ActivitySetup) + ((ActivitySetup) activity).onExit(); + else + ((FragmentBase) getParentFragment()).finish(); } });