mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-24 05:46:14 +03:00
#496 Ensure widgets update when notifyNotesChanged is called.
This commit is contained in:
parent
93fdb5049e
commit
66e34876b3
2 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,7 @@ public class NoteListWidget extends AppWidgetProvider {
|
|||
views.setPendingIntentTemplate(R.id.note_list_widget_lv_dark, templatePI);
|
||||
views.setRemoteAdapter(appWidgetId, R.id.note_list_widget_lv_dark, serviceIntent);
|
||||
views.setEmptyView(R.id.note_list_widget_lv_dark, R.id.widget_note_list_placeholder_tv_dark);
|
||||
awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.note_list_widget_lv_dark);
|
||||
} else {
|
||||
views = new RemoteViews(context.getPackageName(), R.layout.widget_note_list);
|
||||
views.setTextViewText(R.id.widget_note_list_title_tv, getWidgetTitle(context, displayMode, category));
|
||||
|
@ -85,6 +86,7 @@ public class NoteListWidget extends AppWidgetProvider {
|
|||
views.setPendingIntentTemplate(R.id.note_list_widget_lv, templatePI);
|
||||
views.setRemoteAdapter(appWidgetId, R.id.note_list_widget_lv, serviceIntent);
|
||||
views.setEmptyView(R.id.note_list_widget_lv, R.id.widget_note_list_placeholder_tv);
|
||||
awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.note_list_widget_lv);
|
||||
}
|
||||
|
||||
awm.updateAppWidget(appWidgetId, views);
|
||||
|
|
|
@ -47,11 +47,13 @@ public class SingleNoteWidget extends AppWidgetProvider {
|
|||
views.setPendingIntentTemplate(R.id.single_note_widget_lv_dark, templatePendingIntent);
|
||||
views.setRemoteAdapter(R.id.single_note_widget_lv_dark, serviceIntent);
|
||||
views.setEmptyView(R.id.single_note_widget_lv_dark, R.id.widget_single_note_placeholder_tv_dark);
|
||||
awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.single_note_widget_lv_dark);
|
||||
} else {
|
||||
views = new RemoteViews(context.getPackageName(), R.layout.widget_single_note);
|
||||
views.setPendingIntentTemplate(R.id.single_note_widget_lv, templatePendingIntent);
|
||||
views.setRemoteAdapter(R.id.single_note_widget_lv, serviceIntent);
|
||||
views.setEmptyView(R.id.single_note_widget_lv, R.id.widget_single_note_placeholder_tv);
|
||||
awm.notifyAppWidgetViewDataChanged(appWidgetId, R.id.single_note_widget_lv);
|
||||
}
|
||||
|
||||
awm.updateAppWidget(appWidgetId, views);
|
||||
|
|
Loading…
Reference in a new issue