fix: Downloads resetting with multiple active downloads (#606)

feat: Add sync count icon to menu bars
This commit is contained in:
PartyDonut 2025-11-12 19:51:09 +01:00 committed by GitHub
parent 493f40645c
commit d8f613de07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 105 additions and 67 deletions

View file

@ -44,6 +44,11 @@ class BackgroundDownloader extends _$BackgroundDownloader {
if (status == TaskStatus.complete || status == TaskStatus.canceled) {
ref.read(downloadTasksProvider(update.task.taskId).notifier).update((state) => DownloadStream.empty());
ref
.read(activeDownloadTasksProvider.notifier)
.update((state) => state.where((element) => element.taskId != update.task.taskId).toList());
ref.read(syncProvider.notifier).cleanupTemporaryFiles();
}
case TaskProgressUpdate():
final progress = update.progress;