diff --git a/app/src/main/java/eu/faircode/email/WidgetUnified.java b/app/src/main/java/eu/faircode/email/WidgetUnified.java index 1f6570b6f2..e2507d1867 100644 --- a/app/src/main/java/eu/faircode/email/WidgetUnified.java +++ b/app/src/main/java/eu/faircode/email/WidgetUnified.java @@ -101,13 +101,12 @@ public class WidgetUnified extends AppWidgetProvider { views.setOnClickPendingIntent(R.id.title, pi); - views.setViewVisibility(R.id.refresh, refresh ? View.VISIBLE : View.GONE); - views.setViewPadding(R.id.refresh, px, px, px, px); - views.setOnClickPendingIntent(R.id.refresh, piSync); - long now = new Date().getTime(); long refreshing = prefs.getLong("widget." + appWidgetId + ".sync", 0L); - views.setViewVisibility(R.id.refresh, refreshing < now ? View.VISIBLE : View.INVISIBLE); + views.setViewVisibility(R.id.refresh, refresh && refreshing < now ? View.VISIBLE : View.INVISIBLE); + + views.setViewPadding(R.id.refresh, px, px, px, px); + views.setOnClickPendingIntent(R.id.refresh, piSync); views.setViewVisibility(R.id.compose, compose ? View.VISIBLE : View.GONE); views.setViewPadding(R.id.compose, px, px, px, px);