Fixed messages widget empty space

This commit is contained in:
M66B 2021-09-01 15:46:06 +02:00
parent e1a701b264
commit f853579038
1 changed files with 6 additions and 3 deletions

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);