Compare commits

...

2 Commits

Author SHA1 Message Date
Jenni Vandervort 12a0bded42
Merge 30b463fe52 into 1a3ed2bc14 2025-06-11 20:24:10 +08:00
shunlibest 30b463fe52 fix(ModelDownloadManager): Update download progress check method
Change the download progress check from `getDownloadSizeTotal` to `getDownloadSizeSaved` to more accurately reflect the saved download data size.
2025-06-11 16:58:53 +08:00
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class ModelDownloadManager private constructor(private val context: Context) {
if (getDownloadedFile(modelId) != null) { if (getDownloadedFile(modelId) != null) {
downloadInfo.downlodaState = DownloadInfo.DownloadSate.COMPLETED downloadInfo.downlodaState = DownloadInfo.DownloadSate.COMPLETED
downloadInfo.progress = 1.0 downloadInfo.progress = 1.0
} else if (getDownloadSizeTotal(ApplicationProvider.get(), modelId) > 0) { } else if (getDownloadSizeSaved(ApplicationProvider.get(), modelId) > 0) {
val totalSize = getDownloadSizeTotal(ApplicationProvider.get(), modelId) val totalSize = getDownloadSizeTotal(ApplicationProvider.get(), modelId)
val savedSize = getDownloadSizeSaved(ApplicationProvider.get(), modelId) val savedSize = getDownloadSizeSaved(ApplicationProvider.get(), modelId)
downloadInfo.totalSize = totalSize downloadInfo.totalSize = totalSize