cancel in-flight downloads when offline mode turns on

This commit is contained in:
austinried
2026-10-04 00:30:05 +00:00
parent ae4c500ae1
commit 26e9b6cb27
2 changed files with 22 additions and 0 deletions
@@ -76,6 +76,11 @@ class DownloadRepository(
scope.launch {
sourceRepository.activeSourceId().distinctUntilChanged().collect { reconcile() }
}
scope.launch {
sourceRepository.offline.collect { offline ->
if (offline) cancelActive()
}
}
}
fun close() {