Commit e93d6660 authored by Thomas's avatar Thomas
Browse files

#1222 - Open toot by tapping on Scheduled Boost

parent 65383b87
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import app.fedilab.android.BaseMainActivity;
import app.fedilab.android.R;
import app.fedilab.android.databinding.DrawerStatusScheduledBinding;
import app.fedilab.android.mastodon.activities.ComposeActivity;
import app.fedilab.android.mastodon.activities.ContextActivity;
import app.fedilab.android.mastodon.client.entities.api.ScheduledStatus;
import app.fedilab.android.mastodon.client.entities.api.Tag;
import app.fedilab.android.mastodon.client.entities.app.CachedBundle;
@@ -142,6 +143,17 @@ public class StatusScheduledAdapter extends RecyclerView.Adapter<StatusScheduled
                    intent.putExtras(bundle);
                    context.startActivity(intent);
                });
            } else if(scheduledBoosts != null) {
                Intent intentContext = new Intent(context, ContextActivity.class);
                Bundle args2 = new Bundle();
                args2.putSerializable(Helper.ARG_STATUS, scheduledBoosts.get(position).status);
                new CachedBundle(context).insertBundle(args2, Helper.getCurrentAccount(context), bundleId2 -> {
                    Bundle bundleCached = new Bundle();
                    bundleCached.putLong(Helper.ARG_INTENT_ID, bundleId2);
                    intentContext.putExtras(bundleCached);
                    intentContext.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                    context.startActivity(intentContext);
                });
            }
        });
        holder.binding.delete.setOnClickListener(v -> {