#477 pin app bar when selecting items

This commit is contained in:
Thibault Deckers 2023-01-13 14:47:41 +01:00
parent 0e3cf257bd
commit a39cd18d62
4 changed files with 10 additions and 1 deletions

View file

@ -10,12 +10,17 @@ All notable changes to this project will be documented in this file.
- Collection: unlocated/untagged overlay icons
- Video: stop when losing audio focus
- Video: stop when becoming noisy
- Info: Google camera portrait mode item extraction
- TV: handle overscan
- TV: improved support for Viewer, Info, Map, Stats
- TV: option to use TV layout on any device
- Czech translation (thanks vesp)
### Changed
- editing description writes XMP `dc:description`, and clears Exif `ImageDescription` / `UserComment`
- in the tag editor, tapping on applied tag applies it to all items instead of removing it
- pin app bar when selecting items
### Fixed

View file

@ -168,6 +168,7 @@ class _CollectionAppBarState extends State<CollectionAppBar> with SingleTickerPr
final onFilterTap = removableFilters ? collection.removeFilter : null;
return AvesAppBar(
contentHeight: appBarContentHeight,
pinned: context.select<Selection<AvesEntry>, bool>((selection) => selection.isSelecting),
leading: _buildAppBarLeading(
hasDrawer: appMode.canNavigate,
isSelecting: isSelecting,

View file

@ -9,6 +9,7 @@ import 'package:provider/provider.dart';
class AvesAppBar extends StatelessWidget {
final double contentHeight;
final bool pinned;
final Widget? leading;
final Widget title;
final List<Widget> actions;
@ -21,6 +22,7 @@ class AvesAppBar extends StatelessWidget {
const AvesAppBar({
super.key,
required this.contentHeight,
required this.pinned,
required this.leading,
required this.title,
required this.actions,
@ -36,7 +38,7 @@ class AvesAppBar extends StatelessWidget {
final useTvLayout = settings.useTvLayout;
return SliverPersistentHeader(
floating: !useTvLayout,
pinned: false,
pinned: pinned,
delegate: _SliverAppBarDelegate(
height: mqPaddingTop + appBarHeightForContentHeight(contentHeight),
child: DirectionalSafeArea(

View file

@ -137,6 +137,7 @@ class _FilterGridAppBarState<T extends CollectionFilter, CSAD extends ChipSetAct
final actions = actionsBuilder(context, appMode, selection, widget.actionDelegate);
return AvesAppBar(
contentHeight: appBarContentHeight,
pinned: context.select<Selection<FilterGridItem<T>>, bool>((selection) => selection.isSelecting),
leading: _buildAppBarLeading(
hasDrawer: appMode.canNavigate,
isSelecting: isSelecting,