#1222 - Open toot by tapping on Scheduled Boost

This commit is contained in:
Thomas 2025-06-01 10:45:58 +02:00
parent 65383b8787
commit e93d6660f1

View file

@ -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 -> {