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) {
|
return switch (this) {
|
||||||
SlideshowAction.resume => l10n.slideshowActionResume,
|
SlideshowAction.resume => l10n.slideshowActionResume,
|
||||||
SlideshowAction.showInCollection => l10n.slideshowActionShowInCollection,
|
SlideshowAction.showInCollection => l10n.slideshowActionShowInCollection,
|
||||||
|
SlideshowAction.cast => l10n.entryActionCast,
|
||||||
SlideshowAction.settings => l10n.viewerActionSettings,
|
SlideshowAction.settings => l10n.viewerActionSettings,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -19,6 +20,7 @@ extension ExtraSlideshowActionView on SlideshowAction {
|
||||||
return switch (this) {
|
return switch (this) {
|
||||||
SlideshowAction.resume => AIcons.play,
|
SlideshowAction.resume => AIcons.play,
|
||||||
SlideshowAction.showInCollection => AIcons.allCollection,
|
SlideshowAction.showInCollection => AIcons.allCollection,
|
||||||
|
SlideshowAction.cast => AIcons.cast,
|
||||||
SlideshowAction.settings => AIcons.settings,
|
SlideshowAction.settings => AIcons.settings,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ class _SlideshowButtonsState extends State<SlideshowButtons> {
|
||||||
static const List<SlideshowAction> _actions = [
|
static const List<SlideshowAction> _actions = [
|
||||||
SlideshowAction.resume,
|
SlideshowAction.resume,
|
||||||
SlideshowAction.showInCollection,
|
SlideshowAction.showInCollection,
|
||||||
|
SlideshowAction.cast,
|
||||||
SlideshowAction.settings,
|
SlideshowAction.settings,
|
||||||
];
|
];
|
||||||
static const double _padding = ViewerButtonRowContent.padding;
|
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();
|
void _requestFocus() => _buttonRowFocusScopeNode.children.firstOrNull?.requestFocus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,9 @@ class _SlideshowPageState extends State<SlideshowPage> {
|
||||||
_viewerController.autopilot = true;
|
_viewerController.autopilot = true;
|
||||||
case SlideshowAction.showInCollection:
|
case SlideshowAction.showInCollection:
|
||||||
_showInCollection();
|
_showInCollection();
|
||||||
|
case SlideshowAction.cast:
|
||||||
|
// ignore, as it should be handled at the viewer level
|
||||||
|
break;
|
||||||
case SlideshowAction.settings:
|
case SlideshowAction.settings:
|
||||||
_showSettings(context);
|
_showSettings(context);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
enum SlideshowAction {
|
enum SlideshowAction {
|
||||||
resume,
|
resume,
|
||||||
showInCollection,
|
showInCollection,
|
||||||
|
cast,
|
||||||
settings,
|
settings,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue