cast from slideshow
This commit is contained in:
parent
23bccca538
commit
2c3239d13f
4 changed files with 15 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ class _SlideshowButtonsState extends State<SlideshowButtons> {
|
|||
static const List<SlideshowAction> _actions = [
|
||||
SlideshowAction.resume,
|
||||
SlideshowAction.showInCollection,
|
||||
SlideshowAction.cast,
|
||||
SlideshowAction.settings,
|
||||
];
|
||||
static const double _padding = ViewerButtonRowContent.padding;
|
||||
|
@ -116,7 +117,14 @@ class _SlideshowButtonsState extends State<SlideshowButtons> {
|
|||
);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
|
|
@ -125,6 +125,9 @@ class _SlideshowPageState extends State<SlideshowPage> {
|
|||
_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);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
enum SlideshowAction {
|
||||
resume,
|
||||
showInCollection,
|
||||
cast,
|
||||
settings,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue