mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-24 10:28:50 +01:00
Move the delete button from viewer to detail pane for album files to avoid confusion
This commit is contained in:
parent
436a760950
commit
7dde4b1de9
2 changed files with 15 additions and 5 deletions
|
@ -249,11 +249,12 @@ class _ViewerState extends State<Viewer>
|
|||
tooltip: L10n.global().downloadTooltip,
|
||||
onPressed: _onDownloadPressed,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.delete_outlined),
|
||||
tooltip: L10n.global().deleteTooltip,
|
||||
onPressed: () => _onDeletePressed(context),
|
||||
),
|
||||
if (widget.fromCollection == null)
|
||||
IconButton(
|
||||
icon: const Icon(Icons.delete_outlined),
|
||||
tooltip: L10n.global().deleteTooltip,
|
||||
onPressed: () => _onDeletePressed(context),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -332,6 +333,7 @@ class _ViewerState extends State<Viewer>
|
|||
onArchivePressed: _onArchivePressed,
|
||||
onUnarchivePressed: _onUnarchivePressed,
|
||||
onSlideshowPressed: _onSlideshowPressed,
|
||||
onDeletePressed: _onDeletePressed,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
|
@ -61,6 +61,7 @@ class ViewerDetailPane extends StatefulWidget {
|
|||
required this.onRemoveFromCollectionPressed,
|
||||
required this.onArchivePressed,
|
||||
required this.onUnarchivePressed,
|
||||
required this.onDeletePressed,
|
||||
this.onSlideshowPressed,
|
||||
}) : super(key: key);
|
||||
|
||||
|
@ -76,6 +77,7 @@ class ViewerDetailPane extends StatefulWidget {
|
|||
final void Function(BuildContext context) onRemoveFromCollectionPressed;
|
||||
final void Function(BuildContext context) onArchivePressed;
|
||||
final void Function(BuildContext context) onUnarchivePressed;
|
||||
final void Function(BuildContext context) onDeletePressed;
|
||||
final VoidCallback? onSlideshowPressed;
|
||||
}
|
||||
|
||||
|
@ -192,6 +194,12 @@ class _ViewerDetailPaneState extends State<ViewerDetailPane> {
|
|||
label: L10n.global().archiveTooltip,
|
||||
onPressed: () => widget.onArchivePressed(context),
|
||||
),
|
||||
if (widget.fromCollection != null)
|
||||
_DetailPaneButton(
|
||||
icon: Icons.delete_outlined,
|
||||
label: L10n.global().deleteTooltip,
|
||||
onPressed: () => widget.onDeletePressed(context),
|
||||
),
|
||||
_DetailPaneButton(
|
||||
icon: Icons.slideshow_outlined,
|
||||
label: L10n.global().slideshowTooltip,
|
||||
|
|
Loading…
Reference in a new issue