fix: report Idle instead of fake Success when nothing is downloaded
The early return skipped the terminal-state delay and reset, leaving a phantom 100% Success (and a stuck "indexing" bar plus a success notification) for downloads that never happened.
This commit is contained in:
@@ -58,7 +58,7 @@ class DownloadManager(
|
||||
|
||||
if (enabledSources.isEmpty()) {
|
||||
dictionaryRepository.performAllCleanup()
|
||||
updateDownloadProgressState(DownloadState.Success, 1f)
|
||||
updateDownloadProgressState(DownloadState.Idle, 0f)
|
||||
return@withLock
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class DownloadManager(
|
||||
mutex.withLock {
|
||||
try {
|
||||
if (sourceUrls.isEmpty()) {
|
||||
updateDownloadProgressState(DownloadState.Success, 1f)
|
||||
updateDownloadProgressState(DownloadState.Idle, 0f)
|
||||
return@withLock
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ class DownloadManager(
|
||||
}
|
||||
|
||||
if (sources.isEmpty()) {
|
||||
updateDownloadProgressState(DownloadState.Success, 1f)
|
||||
updateDownloadProgressState(DownloadState.Idle, 0f)
|
||||
return@withLock
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user