Clean up orphaned activities as well

This commit is contained in:
Balazs Perlaki-Horvath 2025-02-14 10:56:07 +01:00 committed by Kelson
parent 187a0a5782
commit ce266fbeb1

View File

@ -135,6 +135,10 @@ final class ActivityService {
activity = nil
isStarted = false
downloadTimes = [:]
// make sure we clean up orphan activities of the same type as well
for activity in Activity<DownloadActivityAttributes>.activities {
await activity.end(nil, dismissalPolicy: .immediate)
}
}
}