diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-07-13 17:42:34 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-07-13 17:42:34 +0300 |
commit | 01acc55c80de9c2f8915782a9ec7921b3363f549 (patch) | |
tree | 6eccac50af47095e6965248dde13fffd5949c842 /app/src/main/java/it/niedermann/nextcloud/deck/ui/widget | |
parent | 6403676b4f6f6a29c06aa2dfa9e502dc4b54c888 (diff) |
Use EditActivity intent factory method
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/stack/StackWidgetFactory.java | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java index 11e30f349..bc275e906 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/widget/stack/StackWidgetFactory.java @@ -6,7 +6,6 @@ import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.net.Uri; -import android.os.Bundle; import android.widget.RemoteViews; import android.widget.RemoteViewsService; @@ -97,17 +96,11 @@ public class StackWidgetFactory implements RemoteViewsService.RemoteViewsFactory } FullCard card = cardList.get(i); - final Intent intent = new Intent(); - final Bundle extras = new Bundle(); widget_entry = new RemoteViews(context.getPackageName(), R.layout.widget_stack_entry); widget_entry.setTextViewText(R.id.widget_entry_content_tv, card.card.getTitle()); - extras.putSerializable(EditActivity.BUNDLE_KEY_ACCOUNT, account); - extras.putLong(EditActivity.BUNDLE_KEY_BOARD_ID, stack.getStack().getBoardId()); - extras.putLong(EditActivity.BUNDLE_KEY_STACK_ID, stack.getStack().getId()); - extras.putLong(EditActivity.BUNDLE_KEY_CARD_ID, card.card.getLocalId()); - intent.putExtra(StackWidget.BUNDLE_KEY, extras); + final Intent intent = EditActivity.createEditCardIntent(context, account, stack.getStack().getBoardId(), card.getCard().getLocalId()); intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))); widget_entry.setOnClickFillInIntent(R.id.widget_stack_entry, intent); |