feat: make images scrollable in hidden preview mode
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user