diff --git a/lib/view/src/actions/slideshow.dart b/lib/view/src/actions/slideshow.dart index 69635df33..a047322cc 100644 --- a/lib/view/src/actions/slideshow.dart +++ b/lib/view/src/actions/slideshow.dart @@ -9,6 +9,7 @@ extension ExtraSlideshowActionView on SlideshowAction { return switch (this) { SlideshowAction.resume => l10n.slideshowActionResume, SlideshowAction.showInCollection => l10n.slideshowActionShowInCollection, + SlideshowAction.cast => l10n.entryActionCast, SlideshowAction.settings => l10n.viewerActionSettings, }; } @@ -19,6 +20,7 @@ extension ExtraSlideshowActionView on SlideshowAction { return switch (this) { SlideshowAction.resume => AIcons.play, SlideshowAction.showInCollection => AIcons.allCollection, + SlideshowAction.cast => AIcons.cast, SlideshowAction.settings => AIcons.settings, }; } diff --git a/lib/widgets/viewer/overlay/slideshow_buttons.dart b/lib/widgets/viewer/overlay/slideshow_buttons.dart index bb42659a2..5b84cc031 100644 --- a/lib/widgets/viewer/overlay/slideshow_buttons.dart +++ b/lib/widgets/viewer/overlay/slideshow_buttons.dart @@ -30,6 +30,7 @@ class _SlideshowButtonsState extends State { static const List _actions = [ SlideshowAction.resume, SlideshowAction.showInCollection, + SlideshowAction.cast, SlideshowAction.settings, ]; static const double _padding = ViewerButtonRowContent.padding; @@ -116,7 +117,14 @@ class _SlideshowButtonsState extends State { ); } - void _onAction(BuildContext context, SlideshowAction action) => SlideshowActionNotification(action).dispatch(context); + void _onAction(BuildContext context, SlideshowAction action) { + switch (action) { + case SlideshowAction.cast: + const CastNotification(true).dispatch(context); + default: + SlideshowActionNotification(action).dispatch(context); + } + } void _requestFocus() => _buttonRowFocusScopeNode.children.firstOrNull?.requestFocus(); } diff --git a/lib/widgets/viewer/slideshow_page.dart b/lib/widgets/viewer/slideshow_page.dart index 2d59ac63a..12331b58a 100644 --- a/lib/widgets/viewer/slideshow_page.dart +++ b/lib/widgets/viewer/slideshow_page.dart @@ -125,6 +125,9 @@ class _SlideshowPageState extends State { _viewerController.autopilot = true; case SlideshowAction.showInCollection: _showInCollection(); + case SlideshowAction.cast: + // ignore, as it should be handled at the viewer level + break; case SlideshowAction.settings: _showSettings(context); } diff --git a/plugins/aves_model/lib/src/actions/slideshow.dart b/plugins/aves_model/lib/src/actions/slideshow.dart index bb0facbd6..a4f7825a4 100644 --- a/plugins/aves_model/lib/src/actions/slideshow.dart +++ b/plugins/aves_model/lib/src/actions/slideshow.dart @@ -1,5 +1,6 @@ enum SlideshowAction { resume, showInCollection, + cast, settings, }