diff options
author | Thomas <tschneider.ac@gmail.com> | 2024-01-16 17:54:54 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2024-01-16 17:54:54 +0100 |
commit | 1f2e6c4327eb5aca4a06829c21530da5c8f13a1d (patch) | |
tree | 285eaec81dd9f9bc1680d12e582df2a892457725 /app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java | |
parent | a1370693fb564d48aa56a602b7b912e864480f74 (diff) | |
parent | 886b74c171f3e92f9bb394150a1ce99cf3491d76 (diff) |
Merge branch 'develop'3.27.0
Diffstat (limited to 'app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java')
-rw-r--r-- | app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java index 96648818e..14334b898 100644 --- a/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java +++ b/app/src/main/java/app/fedilab/android/mastodon/ui/drawer/StatusScheduledAdapter.java @@ -16,10 +16,12 @@ package app.fedilab.android.mastodon.ui.drawer; import static androidx.core.text.HtmlCompat.FROM_HTML_MODE_LEGACY; +import static app.fedilab.android.BaseMainActivity.currentAccount; import android.content.Context; import android.content.Intent; import android.os.Build; +import android.os.Bundle; import android.text.Html; import android.text.SpannableString; import android.view.LayoutInflater; @@ -44,6 +46,7 @@ import app.fedilab.android.R; import app.fedilab.android.databinding.DrawerStatusScheduledBinding; import app.fedilab.android.mastodon.activities.ComposeActivity; import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus; +import app.fedilab.android.mastodon.client.entities.app.CachedBundle; import app.fedilab.android.mastodon.client.entities.app.ScheduledBoost; import app.fedilab.android.mastodon.client.entities.app.StatusDraft; import app.fedilab.android.mastodon.exception.DBException; @@ -126,10 +129,15 @@ public class StatusScheduledAdapter extends RecyclerView.Adapter<StatusScheduled holder.binding.cardviewContainer.setOnClickListener(v -> { if (statusDraft != null) { Intent intent = new Intent(context, ComposeActivity.class); - intent.putExtra(Helper.ARG_STATUS_DRAFT, statusDraft); - context.startActivity(intent); + Bundle args = new Bundle(); + args.putSerializable(Helper.ARG_STATUS_DRAFT, statusDraft); + new CachedBundle(context).insertBundle(args, currentAccount, bundleId -> { + Bundle bundle = new Bundle(); + bundle.putLong(Helper.ARG_INTENT_ID, bundleId); + intent.putExtras(bundle); + context.startActivity(intent); + }); } - }); holder.binding.delete.setOnClickListener(v -> { AlertDialog.Builder unfollowConfirm = new MaterialAlertDialogBuilder(context); |