mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 05:15:13 +02:00
Async widget sync state update
This commit is contained in:
@@ -105,9 +105,8 @@ public class WidgetUnified extends AppWidgetProvider {
|
||||
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.setImageViewResource(R.id.refresh, refreshing < now ? R.drawable.twotone_sync_24 : R.drawable.twotone_compare_arrows_24);
|
||||
boolean syncing = prefs.getBoolean("widget." + appWidgetId + ".syncing", false);
|
||||
views.setImageViewResource(R.id.refresh, syncing ? R.drawable.twotone_compare_arrows_24 : R.drawable.twotone_sync_24);
|
||||
views.setViewVisibility(R.id.refresh, refresh ? View.VISIBLE : View.INVISIBLE);
|
||||
|
||||
views.setViewVisibility(R.id.compose, compose ? View.VISIBLE : View.GONE);
|
||||
|
||||
Reference in New Issue
Block a user