From 6256a226912cf77738a81f5aa291e6cbf0a7d460 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 2 Jan 2020 08:58:39 +0100 Subject: [PATCH] Show outline icon when no new messages --- app/src/main/java/eu/faircode/email/Widget.java | 3 +++ app/src/main/res/layout/widget.xml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/Widget.java b/app/src/main/java/eu/faircode/email/Widget.java index d284e7b456..13f51d568d 100644 --- a/app/src/main/java/eu/faircode/email/Widget.java +++ b/app/src/main/java/eu/faircode/email/Widget.java @@ -68,6 +68,9 @@ public class Widget extends AppWidgetProvider { views.setOnClickPendingIntent(R.id.widget, pi); + views.setImageViewResource(R.id.ivMessage, unseen == 0 + ? R.drawable.baseline_mail_outline_24 + : R.drawable.baseline_mail_24); views.setTextViewText(R.id.tvCount, unseen < 100 ? nf.format(unseen) : "∞"); if (!TextUtils.isEmpty(name)) { diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml index e74688aa82..09fe164d16 100644 --- a/app/src/main/res/layout/widget.xml +++ b/app/src/main/res/layout/widget.xml @@ -8,6 +8,7 @@ android:padding="6dp">