diff --git a/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java b/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java index a03f2d5de1..22bb1e5e40 100644 --- a/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java +++ b/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java @@ -75,6 +75,7 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot private int colorSeparator; private boolean pro; private boolean hasColor; + private boolean allColors; private List messages = new ArrayList<>(); WidgetUnifiedRemoteViewsFactory(final Context context, Intent intent) { @@ -151,12 +152,13 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot } hasColor = false; + allColors = color_stripe; if (account < 0) for (TupleMessageWidget message : messages) - if (message.accountColor != null) { + if (message.accountColor == null) + allColors = false; + else hasColor = true; - break; - } } @Override @@ -251,7 +253,7 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot views.setInt(R.id.separator, "setBackgroundColor", colorSeparator); views.setViewVisibility(R.id.separator, separators ? View.VISIBLE : View.GONE); - views.setViewVisibility(idAccount, account < 0 ? View.VISIBLE : View.GONE); + views.setViewVisibility(idAccount, account < 0 && !allColors ? View.VISIBLE : View.GONE); } catch (Throwable ex) { Log.e(ex);