fix: display album image in selection mode (#22087)

* fix: display album image in selection mode

* fix: align MultiSelectStatusButton to display instead of back button in album

* small styling tweak

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Viktor Mykhailiv 2025-09-17 15:38:25 +01:00 committed by GitHub
parent 61c3f27fdc
commit 0c0bec6ae2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 82 additions and 81 deletions

View File

@ -84,7 +84,8 @@ class _RemoteAlbumBottomSheetState extends ConsumerState<RemoteAlbumBottomSheet>
return BaseBottomSheet(
controller: sheetController,
initialChildSize: 0.45,
initialChildSize: 0.22,
minChildSize: 0.22,
maxChildSize: 0.85,
shouldCloseOnMinExtent: false,
actions: [

View File

@ -356,7 +356,14 @@ class _SliverTimelineState extends ConsumerState<_SliverTimeline> {
children: [
timeline,
if (!isSelectionMode && isMultiSelectEnabled) ...[
const Positioned(top: 60, left: 25, child: _MultiSelectStatusButton()),
Positioned(
top: MediaQuery.paddingOf(context).top,
left: 25,
child: const SizedBox(
height: kToolbarHeight,
child: Center(child: _MultiSelectStatusButton()),
),
),
if (widget.bottomSheet != null) widget.bottomSheet!,
],
],

View File

@ -75,21 +75,15 @@ class _MesmerizingSliverAppBarState extends ConsumerState<RemoteAlbumSliverAppBa
const Shadow(offset: Offset(0, 2), blurRadius: 0, color: Colors.transparent),
];
if (isMultiSelectEnabled) {
return SliverToBoxAdapter(
child: switch (_scrollProgress) {
< 0.8 => const SizedBox(height: 120),
_ => const SizedBox(height: 452),
},
);
} else {
return SliverAppBar(
expandedHeight: 400.0,
floating: false,
pinned: true,
snap: false,
elevation: 0,
leading: IconButton(
leading: isMultiSelectEnabled
? const SizedBox.shrink()
: IconButton(
icon: Icon(
Platform.isIOS ? Icons.arrow_back_ios_new_rounded : Icons.arrow_back,
color: actionIconColor,
@ -156,7 +150,6 @@ class _MesmerizingSliverAppBarState extends ConsumerState<RemoteAlbumSliverAppBa
);
}
}
}
class _ExpandedBackground extends ConsumerStatefulWidget {
final double scrollProgress;