feat: make images scrollable in hidden preview mode

This commit is contained in:
LucasGGamerM
2023-09-13 07:43:00 -03:00
parent 652c5e1d16
commit 9515edea4b

View File

@@ -99,10 +99,8 @@ public class FileStatusDisplayItem extends StatusDisplayItem{
if(!item.attachment.type.isImage()) { if(!item.attachment.type.isImage()) {
UiUtils.openURL(itemView.getContext(), item.parentFragment.getAccountID(), getUrl()); UiUtils.openURL(itemView.getContext(), item.parentFragment.getAccountID(), getUrl());
} else { } else {
List<Attachment> attachmentArray = new ArrayList<>(); // TODO make the cool animation work decently with multiple FileStatusDisplayItems
attachmentArray.add(item.attachment); currentPhotoViewer=new PhotoViewer((Activity) context, item.status.mediaAttachments, item.status.mediaAttachments.indexOf(item.attachment),
currentPhotoViewer=new PhotoViewer((Activity) context, attachmentArray, 0,
new SingleImagePhotoViewerListener(title, inner, new int[]{V.dp(28), V.dp(28), V.dp(28), V.dp(28)}, item.parentFragment, ()->currentPhotoViewer=null, ()->context.getDrawable(R.drawable.bg_search_field), null, null)); new SingleImagePhotoViewerListener(title, inner, new int[]{V.dp(28), V.dp(28), V.dp(28), V.dp(28)}, item.parentFragment, ()->currentPhotoViewer=null, ()->context.getDrawable(R.drawable.bg_search_field), null, null));
} }
} }