From 10deff8c7e6a2ef1f2d91a92d855702121c868f0 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 28 May 2024 17:14:37 +0200 Subject: [PATCH] Fixed toolbar account selector --- app/src/main/java/eu/faircode/email/FragmentBase.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentBase.java b/app/src/main/java/eu/faircode/email/FragmentBase.java index de4689a8b4..03ffb5fdce 100644 --- a/app/src/main/java/eu/faircode/email/FragmentBase.java +++ b/app/src/main/java/eu/faircode/email/FragmentBase.java @@ -134,10 +134,12 @@ public class FragmentBase extends Fragment { if (actionbar == null) return; - if ((actionbar.getDisplayOptions() & DISPLAY_SHOW_CUSTOM) == 0) + Toolbar toolbar = activity.findViewById(R.id.toolbar); + + if ((actionbar.getDisplayOptions() & DISPLAY_SHOW_CUSTOM) == 0 && toolbar == null) return; - final View custom = actionbar.getCustomView(); + View custom = (toolbar == null ? actionbar.getCustomView() : toolbar); if (custom == null) return;