mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-23 04:33:54 -04:00
Canceling a download now removes all .part files correctly #319
This commit is contained in:
parent
99126c32df
commit
5856dc203d
@ -214,8 +214,8 @@ public class DownloadService extends Service {
|
|||||||
return Observable.create(subscriber -> {
|
return Observable.create(subscriber -> {
|
||||||
if (subscriber.isUnsubscribed()) return;
|
if (subscriber.isUnsubscribed()) return;
|
||||||
try {
|
try {
|
||||||
// Stop if download is completed
|
// Stop if download is completed or download canceled
|
||||||
if (chunk.isDownloaded) {
|
if (chunk.isDownloaded || downloadStatus.get(chunk.getNotificationID()) == 2) {
|
||||||
subscriber.onCompleted();
|
subscriber.onCompleted();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user