fix(downloads): show total size after completion

This commit is contained in:
NimBold
2026-07-15 21:30:01 +03:30
parent ed54a048ab
commit 9f333618fc
4 changed files with 33 additions and 8 deletions
+5
View File
@@ -34,6 +34,11 @@ export const formatDownloadBytes = (bytes: number): string => {
return `${formatDownloadBytesInUnit(bytes, unitIndex)} ${BYTE_UNITS[unitIndex]}`;
};
export const formatDownloadTotal = (display: DownloadSizeDisplay): string =>
display.total && display.unit
? `${display.totalIsEstimate ? '~' : ''}${display.total} ${display.unit}`
: display.fallback;
export const resolveDownloadSizeDisplay = ({
downloadedBytes,
totalBytes,