feat: also hide link card image previews according to showMediaPreview setting
This commit is contained in:
parent
e47fa4f8db
commit
090d2658dd
|
@ -27,10 +27,10 @@ public class LinkCardStatusDisplayItem extends StatusDisplayItem{
|
|||
private final Status status;
|
||||
private final UrlImageLoaderRequest imgRequest;
|
||||
|
||||
public LinkCardStatusDisplayItem(String parentID, BaseStatusListFragment parentFragment, Status status){
|
||||
public LinkCardStatusDisplayItem(String parentID, BaseStatusListFragment parentFragment, Status status, boolean showImagePreview){
|
||||
super(parentID, parentFragment);
|
||||
this.status=status;
|
||||
if(status.card.image!=null)
|
||||
if(status.card.image!=null && showImagePreview)
|
||||
imgRequest=new UrlImageLoaderRequest(status.card.image, 1000, 1000);
|
||||
else
|
||||
imgRequest=null;
|
||||
|
|
|
@ -285,7 +285,7 @@ public abstract class StatusDisplayItem{
|
|||
buildPollItems(parentID, fragment, statusForContent.poll, contentItems, statusForContent);
|
||||
}
|
||||
if(statusForContent.card!=null && statusForContent.mediaAttachments.isEmpty()){
|
||||
contentItems.add(new LinkCardStatusDisplayItem(parentID, fragment, statusForContent));
|
||||
contentItems.add(new LinkCardStatusDisplayItem(parentID, fragment, statusForContent, (flags & FLAG_NO_MEDIA_PREVIEW)==0));
|
||||
}
|
||||
if(contentItems!=items && statusForContent.spoilerRevealed){
|
||||
items.addAll(contentItems);
|
||||
|
|
Loading…
Reference in New Issue