mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 21:34:44 +02:00
Fixed/simplified unified widget update
This commit is contained in:
@@ -22,6 +22,7 @@ package eu.faircode.email;
|
||||
import android.app.PendingIntent;
|
||||
import android.appwidget.AppWidgetManager;
|
||||
import android.appwidget.AppWidgetProvider;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
@@ -57,4 +58,12 @@ public class WidgetUnified extends AppWidgetProvider {
|
||||
appWidgetManager.updateAppWidget(id, views);
|
||||
}
|
||||
}
|
||||
|
||||
static void update(Context context) {
|
||||
Log.i("Widget unified update");
|
||||
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
|
||||
int[] appWidgetIds = AppWidgetManager.getInstance(context).getAppWidgetIds(
|
||||
new ComponentName(context, WidgetUnified.class));
|
||||
appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.lv);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user