diff options
author | ByteHamster <info@bytehamster.com> | 2022-03-11 20:20:24 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-03-11 20:32:01 +0100 |
commit | 09e25620ee7661df520a8c04e935b6bb85f01213 (patch) | |
tree | eaceda8079cc6d369c477ce1123cf87cc439bf6c /app/src/main/java/de/danoeh/antennapod/fragment | |
parent | 36a36e4f853259f34fc3608ed1b21d575129e274 (diff) | |
download | AntennaPod-09e25620ee7661df520a8c04e935b6bb85f01213.zip |
Don't cancel download on click
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/fragment')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java index 804e8dde3..9f0995f38 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/DownloadLogFragment.java @@ -15,7 +15,6 @@ import de.danoeh.antennapod.core.event.DownloadEvent; import de.danoeh.antennapod.core.event.DownloadLogEvent; import de.danoeh.antennapod.core.event.DownloaderUpdate; import de.danoeh.antennapod.core.menuhandler.MenuItemUtils; -import de.danoeh.antennapod.core.service.download.DownloadRequest; import de.danoeh.antennapod.core.service.download.DownloadService; import de.danoeh.antennapod.model.download.DownloadStatus; import de.danoeh.antennapod.core.service.download.Downloader; @@ -23,8 +22,6 @@ import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.core.storage.DBWriter; import de.danoeh.antennapod.core.util.download.AutoUpdateManager; import de.danoeh.antennapod.dialog.DownloadLogDetailsDialog; -import de.danoeh.antennapod.model.feed.FeedItem; -import de.danoeh.antennapod.model.feed.FeedMedia; import de.danoeh.antennapod.ui.common.PagedToolbarFragment; import de.danoeh.antennapod.view.EmptyViewHandler; import io.reactivex.Observable; @@ -98,17 +95,7 @@ public class DownloadLogFragment extends ListFragment { super.onListItemClick(l, v, position, id); Object item = adapter.getItem(position); - if (item instanceof Downloader) { - DownloadRequest downloadRequest = ((Downloader) item).getDownloadRequest(); - DownloadService.cancel(getContext(), downloadRequest.getSource()); - - if (downloadRequest.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) { - FeedMedia media = DBReader.getFeedMedia(downloadRequest.getFeedfileId()); - FeedItem feedItem = media.getItem(); - feedItem.disableAutoDownload(); - DBWriter.setFeedItem(feedItem); - } - } else if (item instanceof DownloadStatus) { + if (item instanceof DownloadStatus) { new DownloadLogDetailsDialog(getContext(), (DownloadStatus) item).show(); } } |