fix: fix crashes when previewUrl is null on calckey
This commit is contained in:
@@ -55,8 +55,8 @@ public class MediaGridStatusDisplayItem extends StatusDisplayItem{
|
|||||||
for(Attachment att:attachments){
|
for(Attachment att:attachments){
|
||||||
requests.add(new UrlImageLoaderRequest(switch(att.type){
|
requests.add(new UrlImageLoaderRequest(switch(att.type){
|
||||||
case IMAGE -> att.url;
|
case IMAGE -> att.url;
|
||||||
case VIDEO, GIFV -> att.previewUrl;
|
case VIDEO, GIFV -> att.previewUrl == null ? att.url : att.previewUrl;
|
||||||
default -> throw new IllegalStateException("Unexpected value: "+att.type);
|
default -> throw new IllegalStateException("Unexpected value: "+att.url);
|
||||||
}, 1000, 1000));
|
}, 1000, 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user