diff --git a/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java b/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java index 5c411a806f..1cc8efab67 100644 --- a/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java +++ b/app/src/main/java/eu/faircode/email/WidgetUnifiedRemoteViewsFactory.java @@ -54,6 +54,7 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot private int colorWidgetRead; private int colorSeparator; private boolean pro; + private boolean hasColor; private List messages = new ArrayList<>(); WidgetUnifiedRemoteViewsFactory(final Context context, Intent intent) { @@ -100,6 +101,14 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot } finally { db.endTransaction(); } + + hasColor = false; + if (account < 0) + for (TupleMessageWidget message : messages) + if (message.accountColor != null) { + hasColor = true; + break; + } } @Override @@ -135,7 +144,7 @@ public class WidgetUnifiedRemoteViewsFactory implements RemoteViewsService.Remot int colorBackground = (message.accountColor == null || !pro ? colorSeparator : message.accountColor); views.setInt(R.id.stripe, "setBackgroundColor", colorBackground); - views.setViewVisibility(R.id.stripe, account < 0 && color_stripe ? View.VISIBLE : View.GONE); + views.setViewVisibility(R.id.stripe, hasColor && color_stripe ? View.VISIBLE : View.GONE); SpannableString ssFrom = new SpannableString(pro ? MessageHelper.formatAddressesShort(message.from)