cleanup leaked downloaded file
This commit is contained in:
+4
-1
@@ -48,7 +48,10 @@ class AndroidOfflineStorage(
|
||||
combine(
|
||||
items.map { item ->
|
||||
downloader.query(item.download_id)
|
||||
.mapNotNull { state -> item.toDomain(state) }
|
||||
.mapNotNull { state ->
|
||||
if (state == null) remove(item.id)
|
||||
item.toDomain(state)
|
||||
}
|
||||
}
|
||||
) { it.toList() }
|
||||
}.flowOn(Dispatchers.IO)
|
||||
|
||||
Reference in New Issue
Block a user