Исправлен баг интерфейса связанный с долгой загрузкой изображений
This commit is contained in:
@@ -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 && (
|
||||
|
||||
Reference in New Issue
Block a user