Skip to content

Commit 83650c6

Browse files
committed
Fix issue with shortcuts on non-followed podcasts.
1 parent 0e7f79f commit 83650c6

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

lib/core/environment.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Environment {
2626
static const _applicationName = 'Anytime';
2727
static const _applicationUrl = 'https://github.com/amugofjava/anytime_podcast_player';
2828
static const _projectVersion = '1.4.0';
29-
static const _build = '234';
29+
static const _build = '235';
3030

3131
static var _agentString = userAgentAppString;
3232

lib/ui/widgets/podcast_grid_tile.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,22 @@ class PodcastGridTile extends StatelessWidget {
5757
});
5858
},
5959
onLongPress: () {
60-
showContextMenu(context);
60+
if (podcast.id != null) {
61+
showContextMenu(context);
62+
}
6163
},
6264
child: Semantics(
6365
customSemanticsActions: {
66+
if (podcast.id != null)
6467
CustomSemanticsAction(label: L.of(context)!.podcast_context_play_latest_episode_label): () =>
6568
audioBloc.playLatestEpisode(podcast),
69+
if (podcast.id != null)
6670
CustomSemanticsAction(label: L.of(context)!.podcast_context_queue_latest_episode_label): () =>
6771
queueBloc.queueEvent(QueueAddLatestEpisodeEvent(podcast: podcast)),
72+
if (podcast.id != null)
6873
CustomSemanticsAction(label: L.of(context)!.podcast_context_play_next_episode_label): () =>
6974
audioBloc.playNextUnplayedEpisode(podcast),
75+
if (podcast.id != null)
7076
CustomSemanticsAction(label: L.of(context)!.podcast_context_queue_next_episode_label): () =>
7177
queueBloc.queueEvent(QueueAddNextUnplayedEpisodeEvent(podcast: podcast)),
7278
},

lib/ui/widgets/podcast_tile.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ class PodcastTile extends StatelessWidget {
4646

4747
return Semantics(
4848
customSemanticsActions: {
49+
if (podcast.id != null)
4950
CustomSemanticsAction(label: L.of(context)!.podcast_context_play_latest_episode_label): () =>
5051
audioBloc.playLatestEpisode(podcast),
52+
if (podcast.id != null)
5153
CustomSemanticsAction(label: L.of(context)!.podcast_context_queue_latest_episode_label): () =>
5254
queueBloc.queueEvent(QueueAddLatestEpisodeEvent(podcast: podcast)),
55+
if (podcast.id != null)
5356
CustomSemanticsAction(label: L.of(context)!.podcast_context_play_next_episode_label): () =>
5457
audioBloc.playNextUnplayedEpisode(podcast),
58+
if (podcast.id != null)
5559
CustomSemanticsAction(label: L.of(context)!.podcast_context_queue_next_episode_label): () =>
5660
queueBloc.queueEvent(QueueAddNextUnplayedEpisodeEvent(podcast: podcast)),
5761
},
@@ -68,7 +72,9 @@ class PodcastTile extends StatelessWidget {
6872
});
6973
},
7074
onLongPress: () {
71-
showContextMenu(context);
75+
if (podcast.id != null) {
76+
showContextMenu(context);
77+
}
7278
},
7379
minVerticalPadding: 9,
7480
leading: ExcludeSemantics(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: anytime
22
description: Anytime Podcast Player
33

4-
version: 1.4.0+234
4+
version: 1.4.0+235
55

66
environment:
77
sdk: '>=3.6.0 <4.0.0'

0 commit comments

Comments
 (0)