Fix stuck notification when refreshing single feed (#6662)

Updating a singletonList throws an UnsupportedOperationException,
so the worker does not remove the notification
This commit is contained in:
ByteHamster 2023-10-01 14:21:19 +02:00 committed by GitHub
parent 0e52f08aa5
commit 7e8ac3aeb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ import de.danoeh.antennapod.model.download.DownloadResult;
import de.danoeh.antennapod.model.feed.Feed;
import de.danoeh.antennapod.net.download.serviceinterface.DownloadRequest;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@ -81,7 +82,8 @@ public class FeedUpdateWorker extends Worker {
if (!feed.isLocalFeed()) {
allAreLocal = false;
}
toUpdate = Collections.singletonList(feed);
toUpdate = new ArrayList<>();
toUpdate.add(feed); // Needs to be updatable, so no singletonList
force = true;
}