|
|
@ -1674,14 +1674,17 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Bundle b = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
b.putInt(Helper.ARG_MEDIA_POSITION, finalMediaPosition);
|
|
|
|
args.putInt(Helper.ARG_MEDIA_POSITION, finalMediaPosition);
|
|
|
|
b.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(statusToDeal.media_attachments));
|
|
|
|
args.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(statusToDeal.media_attachments));
|
|
|
|
mediaIntent.putExtras(b);
|
|
|
|
new CachedBundle(context).insertBundle(args, currentAccount, bundleId -> {
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
Bundle bundle = new Bundle();
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, layoutMediaBinding.media, statusToDeal.media_attachments.get(0).url);
|
|
|
|
bundle.putLong(Helper.ARG_INTENT_ID, bundleId);
|
|
|
|
// start the new activity
|
|
|
|
mediaIntent.putExtras(bundle);
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, layoutMediaBinding.media, statusToDeal.media_attachments.get(0).url);
|
|
|
|
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
layoutMediaBinding.viewHide.setOnClickListener(v -> {
|
|
|
|
layoutMediaBinding.viewHide.setOnClickListener(v -> {
|
|
|
|
statusToDeal.sensitive = !statusToDeal.sensitive;
|
|
|
|
statusToDeal.sensitive = !statusToDeal.sensitive;
|
|
|
@ -1742,14 +1745,17 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Bundle b = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
b.putInt(Helper.ARG_MEDIA_POSITION, finalMediaPosition);
|
|
|
|
args.putInt(Helper.ARG_MEDIA_POSITION, finalMediaPosition);
|
|
|
|
b.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(statusToDeal.media_attachments));
|
|
|
|
args.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(statusToDeal.media_attachments));
|
|
|
|
mediaIntent.putExtras(b);
|
|
|
|
new CachedBundle(context).insertBundle(args, currentAccount, bundleId -> {
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
Bundle bundle = new Bundle();
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, layoutMediaBinding.media, statusToDeal.media_attachments.get(0).url);
|
|
|
|
bundle.putLong(Helper.ARG_INTENT_ID, bundleId);
|
|
|
|
// start the new activity
|
|
|
|
mediaIntent.putExtras(bundle);
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, layoutMediaBinding.media, statusToDeal.media_attachments.get(0).url);
|
|
|
|
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
layoutMediaBinding.viewHide.setOnClickListener(v -> {
|
|
|
|
layoutMediaBinding.viewHide.setOnClickListener(v -> {
|
|
|
|
statusToDeal.sensitive = !statusToDeal.sensitive;
|
|
|
|
statusToDeal.sensitive = !statusToDeal.sensitive;
|
|
|
@ -2782,14 +2788,17 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Bundle b = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
b.putInt(Helper.ARG_MEDIA_POSITION, mediaPosition);
|
|
|
|
args.putInt(Helper.ARG_MEDIA_POSITION, mediaPosition);
|
|
|
|
b.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(statusToDeal.media_attachments));
|
|
|
|
args.putSerializable(Helper.ARG_MEDIA_ARRAY, new ArrayList<>(statusToDeal.media_attachments));
|
|
|
|
mediaIntent.putExtras(b);
|
|
|
|
new CachedBundle(context).insertBundle(args, currentAccount, bundleId -> {
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
Bundle bundle = new Bundle();
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, layoutMediaBinding.media, statusToDeal.media_attachments.get(0).url);
|
|
|
|
bundle.putLong(Helper.ARG_INTENT_ID, bundleId);
|
|
|
|
// start the new activity
|
|
|
|
mediaIntent.putExtras(bundle);
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, layoutMediaBinding.media, statusToDeal.media_attachments.get(0).url);
|
|
|
|
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
layoutMediaBinding.viewHide.setOnClickListener(v -> {
|
|
|
|
layoutMediaBinding.viewHide.setOnClickListener(v -> {
|
|
|
|
statusToDeal.sensitive = !statusToDeal.sensitive;
|
|
|
|
statusToDeal.sensitive = !statusToDeal.sensitive;
|
|
|
@ -3251,15 +3260,19 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
|
|
|
holder.bindingArt.artMedia.setOnClickListener(v -> {
|
|
|
|
holder.bindingArt.artMedia.setOnClickListener(v -> {
|
|
|
|
if (status.art_attachment != null) {
|
|
|
|
if (status.art_attachment != null) {
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Intent mediaIntent = new Intent(context, MediaActivity.class);
|
|
|
|
Bundle b = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
b.putInt(Helper.ARG_MEDIA_POSITION, 1);
|
|
|
|
args.putInt(Helper.ARG_MEDIA_POSITION, 1);
|
|
|
|
ArrayList<Attachment> attachments = new ArrayList<>();
|
|
|
|
ArrayList<Attachment> attachments = new ArrayList<>();
|
|
|
|
attachments.add(status.art_attachment);
|
|
|
|
attachments.add(status.art_attachment);
|
|
|
|
b.putSerializable(Helper.ARG_MEDIA_ARRAY, attachments);
|
|
|
|
args.putSerializable(Helper.ARG_MEDIA_ARRAY, attachments);
|
|
|
|
mediaIntent.putExtras(b);
|
|
|
|
new CachedBundle(context).insertBundle(args, currentAccount, bundleId -> {
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
Bundle bundle = new Bundle();
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, holder.bindingArt.artMedia, status.art_attachment.url);
|
|
|
|
bundle.putLong(Helper.ARG_INTENT_ID, bundleId);
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
mediaIntent.putExtras(bundle);
|
|
|
|
|
|
|
|
ActivityOptionsCompat options = ActivityOptionsCompat
|
|
|
|
|
|
|
|
.makeSceneTransitionAnimation((Activity) context, holder.bindingArt.artMedia, status.art_attachment.url);
|
|
|
|
|
|
|
|
context.startActivity(mediaIntent, options.toBundle());
|
|
|
|
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
|
|
|
Toasty.error(context, context.getString(R.string.toast_error), Toast.LENGTH_LONG).show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|