fix: 安装流程优化-悬浮窗-客户端

This commit is contained in:
曾祥俊
2024-08-02 15:19:17 +08:00
parent 713e4157db
commit e42e2fbd56

View File

@ -335,15 +335,10 @@ class NDownloadSuspendWindowController(private val application: Application) :
return
}
val packageName = event.packageName
val downloadEntity = DownloadManager
.getInstance()
.getDownloadEntityByPackageName(packageName) ?: return
if (shouldSkipDownloadEntity(downloadEntity)) return
val currentDownloadEntity = this.currentDownloadEntity ?: return
// 当所有任务流程都执行完成以后,则显示“完成”状态,否则显示下一个优先级最高的任务
if (calculateDoneCount() == 1) {
if (calculateDoneCount() <= 1 && event.packageName == currentDownloadEntity.packageName) {
iconWindow.setDownloadState(NDownloadState.Complete)
} else if (!initCurrentDownloadEntity()) {
dismiss()