🐛 Bug fixes of player
This commit is contained in:
parent
f83c7bd8a6
commit
715e0e550f
@ -32,11 +32,14 @@ function getThumbnail(item: any): string | null {
|
||||
}
|
||||
|
||||
function getAttachments(item: any): any[] {
|
||||
if (item?.attachments[0] && item?.attachments[0].mimetype.startsWith("image")) {
|
||||
return item?.attachments?.slice(1, item?.attachments?.length - 1) ?? [];
|
||||
} else {
|
||||
return item?.attachments;
|
||||
}
|
||||
let filtered = false;
|
||||
return item.attachments.filter((item: any) => {
|
||||
if(item.mimetype.startsWith("image") && !filtered) {
|
||||
filtered = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
}
|
||||
|
||||
function getAuthorLink(user: any): string {
|
||||
|
Loading…
Reference in New Issue
Block a user