mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-25 16:23:54 +01:00
Only prevent deletion if PlaybackService is running (Closes #2759)
This commit is contained in:
parent
3375fe0a24
commit
cc645c5fb1
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user