3
0
mirror of https://github.com/Qortal/q-mail.git synced 2025-02-12 02:05:56 +00:00

add missing status

This commit is contained in:
PhilReact 2024-01-16 12:54:32 +02:00
parent 819b97703a
commit cd89548928
2 changed files with 15 additions and 1 deletions

View File

@ -183,6 +183,7 @@ const [isValid, setIsValid] = React.useState<boolean>(true)
useEffect(()=> { useEffect(()=> {
handleDownloadMail() handleDownloadMail()
}, []) }, [])
return ( return (
<Dialog <Dialog
open={open} open={open}
@ -214,6 +215,7 @@ const [isValid, setIsValid] = React.useState<boolean>(true)
Message has an invalid format Message has an invalid format
</Typography> </Typography>
)} )}
{}
{!resourceStatus.status && (isValid && !unableToDecrypt) && ( {!resourceStatus.status && (isValid && !unableToDecrypt) && (
<Box <Box
@ -271,7 +273,9 @@ const [isValid, setIsValid] = React.useState<boolean>(true)
</> </>
) : resourceStatus?.status === "DOWNLOADED" ? ( ) : resourceStatus?.status === "DOWNLOADED" ? (
<>Download Completed: building message...</> <>Download Completed: building message...</>
) : resourceStatus?.status === "DOWNLOADING" ? ( ) : resourceStatus?.status === "MISSING_DATA" ? (
<>Missing Data: make sure the sender has their Core turned on.</>
) : resourceStatus?.status === "DOWNLOADING" ? (
<>Downloading Message</> <>Downloading Message</>
) : resourceStatus?.status !== "READY" ? ( ) : resourceStatus?.status !== "READY" ? (
<> <>

View File

@ -170,6 +170,16 @@ const DownloadWrapper: React.FC<Props> = ({ children }) => {
}) })
) )
} }
if (res?.status === 'MISSING_DATA') {
dispatch(
updateDownloads({
name,
service,
identifier,
status: res
})
)
}
}, 5000) // 1 second interval }, 5000) // 1 second interval
fetchVideoUrl({ fetchVideoUrl({