Profile Photo: Fix loading problems (#4044)

This commit is contained in:
Alexander Zinchuk 2023-12-04 14:39:29 +01:00
parent 19d3bf6953
commit 0c5a40bfc1
2 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@
.avatar-media {
width: 100%;
object-fit: cover;
position: relative;
}
.spinner-wrapper {
@ -42,7 +43,6 @@
position: absolute;
top: 0;
left: 0;
z-index: -1;
width: 100%;
height: 100%;
}

View File

@ -119,8 +119,9 @@ export const useMediaProps = ({
bestImageData = previewBlobUrl;
}
const bestData = localBlobUrl || fullMediaBlobUrl || (
!isVideo ? previewBlobUrl || pictogramBlobUrl || bestImageData : undefined
(!isVideoAvatar && !isVideo) ? (previewBlobUrl || pictogramBlobUrl || bestImageData) : undefined
);
const isLocal = Boolean(localBlobUrl);
const fileName = message
? getMessageFileName(message)