Исправлен баг интерфейса связанный с долгой загрузкой изображений

This commit is contained in:
RoyceDa
2026-03-24 17:57:43 +02:00
parent 429aa614d7
commit 697b797f8c

View File

@@ -158,7 +158,7 @@ export function MessageImage(props: AttachmentProps) {
)}
{(downloadStatus == DownloadStatus.NOT_DOWNLOADED || downloadStatus == DownloadStatus.DOWNLOADING) && (<Flex direction={'column'} pos={'absolute'} top={0} justify={'center'} h={'100%'} align={'center'} gap={'xs'}>
{!error && (
{!error && downloadStatus == DownloadStatus.DOWNLOADING && (
<Box style={{
backgroundColor: 'rgba(0, 0, 0, 0.3)',
borderRadius: 50,
@@ -168,11 +168,20 @@ export function MessageImage(props: AttachmentProps) {
justifyContent: 'center',
alignItems: 'center',
}}>
{downloadPercentage > 0 ? (
<AnimatedRoundedProgress size={40} value={downloadPercentage} color="white"></AnimatedRoundedProgress>
) : (
<IconArrowDown size={25} color={'white'} />
)}
<AnimatedRoundedProgress size={40} value={Math.max(1, downloadPercentage)} color="white"></AnimatedRoundedProgress>
</Box>
)}
{!error && downloadStatus != DownloadStatus.DOWNLOADING && (
<Box style={{
backgroundColor: 'rgba(0, 0, 0, 0.3)',
borderRadius: 50,
height: 40,
width: 40,
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}>
<IconArrowDown size={25} color={'white'} />
</Box>
)}
{error && (