mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 23:21:59 +01:00
cancel in-flight downloads when offline mode turns on
This commit is contained in:
@@ -76,6 +76,11 @@ class DownloadRepository(
|
||||
scope.launch {
|
||||
sourceRepository.activeSourceId().distinctUntilChanged().collect { reconcile() }
|
||||
}
|
||||
scope.launch {
|
||||
sourceRepository.offline.collect { offline ->
|
||||
if (offline) cancelActive()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun close() {
|
||||
|
||||
Reference in New Issue
Block a user