diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-14 00:14:20 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-14 00:14:20 +0300 |
commit | 3b709b4b5c030cd565719fe4fd54167a6211c45f (patch) | |
tree | 695e3e4ba03c2e48429003dfe94d9753c1fd3f78 /app/src/main/java/it/niedermann/nextcloud/deck/ui/widget | |
parent | 237a06ff7f4773fcb8386fa399a57e589c069b26 (diff) |
#217 Stack widget - Update widgets
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/ui/widget')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/singlecard/SingleCardWidget.java | 5 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidget.java | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/singlecard/SingleCardWidget.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/singlecard/SingleCardWidget.java index 783f98e00..d8e47134c 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/singlecard/SingleCardWidget.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/singlecard/SingleCardWidget.java @@ -141,13 +141,10 @@ public class SingleCardWidget extends AppWidgetProvider { super.onDeleted(context, appWidgetIds); } - /** * Updates UI data of all {@link SingleCardWidget} instances */ public static void notifyDatasetChanged(Context context) { - Intent intent = new Intent(context, SingleCardWidget.class); - intent.setAction("android.appwidget.action.APPWIDGET_UPDATE"); - context.sendBroadcast(intent); + context.sendBroadcast(new Intent(context, SingleCardWidget.class).setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE)); } } diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidget.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidget.java index ac0daa485..cb179953c 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidget.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidget.java @@ -111,4 +111,11 @@ public class StackWidget extends AppWidgetProvider { syncManager.deleteStackWidgetModel(appWidgetId); } } + + /** + * Updates UI data of all {@link StackWidget} instances + */ + public static void notifyDatasetChanged(Context context) { + context.sendBroadcast(new Intent(context, StackWidget.class).setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE)); + } } |