diff options
author | H. Lehmann <ByteHamster@users.noreply.github.com> | 2018-07-15 15:43:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-15 15:43:42 +0200 |
commit | fc2bd0e19b723c88355100d54f840c66e0cbd308 (patch) | |
tree | 6ae6eb1d509b642c7bb9ecd6b6510d75c6faf892 /app | |
parent | 740e202d7f1a2279c2b3e1fb5c3bdab9829818a3 (diff) | |
parent | 53a3b85272ad7ca68c2bfb2793b993b39a53986b (diff) | |
download | AntennaPod-fc2bd0e19b723c88355100d54f840c66e0cbd308.zip |
Merge pull request #2760 from ByteHamster/delete-item
Improve item deletion
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java | 3 | ||||
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java index c4f476634..51e1271d9 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DownloadedEpisodesListAdapter.java @@ -16,6 +16,7 @@ import com.bumptech.glide.Glide; import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.glide.ApGlideSettings; +import de.danoeh.antennapod.core.service.playback.PlaybackService; import de.danoeh.antennapod.core.util.Converter; import de.danoeh.antennapod.core.util.DateUtils; @@ -98,7 +99,7 @@ public class DownloadedEpisodesListAdapter extends BaseAdapter { holder.pubDate.setText(pubDateStr); FeedItem.State state = item.getState(); - if (state == FeedItem.State.PLAYING) { + if (state == FeedItem.State.PLAYING && PlaybackService.isRunning) { holder.butSecondary.setEnabled(false); holder.butSecondary.setAlpha(0.5f); } else { diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java index 240a7ada8..5075d022a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ItemFragment.java @@ -436,7 +436,7 @@ public class ItemFragment extends Fragment implements OnSwipeGesture { } FeedItem.State state = item.getState(); - if (butAction2Text == R.string.delete_label && state == FeedItem.State.PLAYING) { + if (butAction2Text == R.string.delete_label && state == FeedItem.State.PLAYING && PlaybackService.isRunning) { butAction2.setEnabled(false); butAction2.setAlpha(0.5f); } else { |