1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-25 17:27:00 +00:00

Fixed messages widget empty space

This commit is contained in:
M66B 2021-09-01 15:46:06 +02:00
parent e1a701b264
commit f853579038

View file

@ -101,9 +101,12 @@ public class WidgetUnified extends AppWidgetProvider {
views.setOnClickPendingIntent(R.id.title, pi);
long now = new Date().getTime();
long refreshing = prefs.getLong("widget." + appWidgetId + ".sync", 0L);
views.setViewVisibility(R.id.refresh, refresh && refreshing < now ? View.VISIBLE : View.INVISIBLE);
if (refresh) {
long now = new Date().getTime();
long refreshing = prefs.getLong("widget." + appWidgetId + ".sync", 0L);
views.setViewVisibility(R.id.refresh, refreshing < now ? View.VISIBLE : View.INVISIBLE);
} else
views.setViewVisibility(R.id.refresh, View.GONE);
views.setViewPadding(R.id.refresh, px, px, px, px);
views.setOnClickPendingIntent(R.id.refresh, piSync);