mirror of
https://github.com/amir1376/ab-download-manager.git
synced 2025-02-20 11:43:24 +08:00
fix download completion dialog shows up even if its disabled (#393)
This commit is contained in:
parent
ae89edda6b
commit
0488fc1df5
@ -81,9 +81,10 @@ class SingleDownloadComponent(
|
||||
init {
|
||||
downloadMonitor
|
||||
.downloadListFlow
|
||||
// .conflate()
|
||||
.map { it.firstOrNull { it.id == downloadId } }
|
||||
.distinctUntilChanged()
|
||||
.onEach {
|
||||
val item = it.firstOrNull { it.id == downloadId }
|
||||
val item = it
|
||||
val previous = itemStateFlow.value
|
||||
if (previous is ProcessingDownloadItemState && item is CompletedDownloadItemState) {
|
||||
// if It was opened to show progress
|
||||
|
Loading…
x
Reference in New Issue
Block a user