mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
chore(mobile): don't show drag scroll date in search page (#17594)
Dont show drag scroll date in search page * When using the drag scroll, the date of the current image is shown. This is now made toggleable. * For the mobile search result page, the display of the date is now disabled because the results are not sorted by date and therefore a display of the date is not desirable.
This commit is contained in:
parent
b2753103c6
commit
aad5c3bada
@ -768,6 +768,7 @@ class SearchResultGrid extends StatelessWidget {
|
|||||||
editEnabled: true,
|
editEnabled: true,
|
||||||
favoriteEnabled: true,
|
favoriteEnabled: true,
|
||||||
stackEnabled: false,
|
stackEnabled: false,
|
||||||
|
dragScrollLabelEnabled: false,
|
||||||
emptyIndicator: Padding(
|
emptyIndicator: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||||
child: !isSearching
|
child: !isSearching
|
||||||
|
@ -32,6 +32,7 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||||||
final Widget? topWidget;
|
final Widget? topWidget;
|
||||||
final bool shrinkWrap;
|
final bool shrinkWrap;
|
||||||
final bool showDragScroll;
|
final bool showDragScroll;
|
||||||
|
final bool showDragScrollLabel;
|
||||||
final bool showStack;
|
final bool showStack;
|
||||||
|
|
||||||
const ImmichAssetGrid({
|
const ImmichAssetGrid({
|
||||||
@ -52,6 +53,7 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||||||
this.topWidget,
|
this.topWidget,
|
||||||
this.shrinkWrap = false,
|
this.shrinkWrap = false,
|
||||||
this.showDragScroll = true,
|
this.showDragScroll = true,
|
||||||
|
this.showDragScrollLabel = true,
|
||||||
this.showStack = false,
|
this.showStack = false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -119,6 +121,7 @@ class ImmichAssetGrid extends HookConsumerWidget {
|
|||||||
shrinkWrap: shrinkWrap,
|
shrinkWrap: shrinkWrap,
|
||||||
showDragScroll: showDragScroll,
|
showDragScroll: showDragScroll,
|
||||||
showStack: showStack,
|
showStack: showStack,
|
||||||
|
showLabel: showDragScrollLabel,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
|
|||||||
final bool shrinkWrap;
|
final bool shrinkWrap;
|
||||||
final bool showDragScroll;
|
final bool showDragScroll;
|
||||||
final bool showStack;
|
final bool showStack;
|
||||||
|
final bool showLabel;
|
||||||
|
|
||||||
const ImmichAssetGridView({
|
const ImmichAssetGridView({
|
||||||
super.key,
|
super.key,
|
||||||
@ -78,6 +79,7 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
|
|||||||
this.shrinkWrap = false,
|
this.shrinkWrap = false,
|
||||||
this.showDragScroll = true,
|
this.showDragScroll = true,
|
||||||
this.showStack = false,
|
this.showStack = false,
|
||||||
|
this.showLabel = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -284,7 +286,7 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
|
|||||||
backgroundColor: context.isDarkTheme
|
backgroundColor: context.isDarkTheme
|
||||||
? context.colorScheme.primary.darken(amount: .5)
|
? context.colorScheme.primary.darken(amount: .5)
|
||||||
: context.colorScheme.primary,
|
: context.colorScheme.primary,
|
||||||
labelTextBuilder: _labelBuilder,
|
labelTextBuilder: widget.showLabel ? _labelBuilder : null,
|
||||||
padding: appBarOffset()
|
padding: appBarOffset()
|
||||||
? const EdgeInsets.only(top: 60)
|
? const EdgeInsets.only(top: 60)
|
||||||
: const EdgeInsets.only(),
|
: const EdgeInsets.only(),
|
||||||
|
@ -35,6 +35,7 @@ class MultiselectGrid extends HookConsumerWidget {
|
|||||||
this.onRemoveFromAlbum,
|
this.onRemoveFromAlbum,
|
||||||
this.topWidget,
|
this.topWidget,
|
||||||
this.stackEnabled = false,
|
this.stackEnabled = false,
|
||||||
|
this.dragScrollLabelEnabled = true,
|
||||||
this.archiveEnabled = false,
|
this.archiveEnabled = false,
|
||||||
this.deleteEnabled = true,
|
this.deleteEnabled = true,
|
||||||
this.favoriteEnabled = true,
|
this.favoriteEnabled = true,
|
||||||
@ -50,6 +51,7 @@ class MultiselectGrid extends HookConsumerWidget {
|
|||||||
final Future<bool> Function(Iterable<Asset>)? onRemoveFromAlbum;
|
final Future<bool> Function(Iterable<Asset>)? onRemoveFromAlbum;
|
||||||
final Widget? topWidget;
|
final Widget? topWidget;
|
||||||
final bool stackEnabled;
|
final bool stackEnabled;
|
||||||
|
final bool dragScrollLabelEnabled;
|
||||||
final bool archiveEnabled;
|
final bool archiveEnabled;
|
||||||
final bool unarchive;
|
final bool unarchive;
|
||||||
final bool deleteEnabled;
|
final bool deleteEnabled;
|
||||||
@ -429,6 +431,7 @@ class MultiselectGrid extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
topWidget: topWidget,
|
topWidget: topWidget,
|
||||||
showStack: stackEnabled,
|
showStack: stackEnabled,
|
||||||
|
showDragScrollLabel: dragScrollLabelEnabled,
|
||||||
),
|
),
|
||||||
error: (error, _) => Center(child: Text(error.toString())),
|
error: (error, _) => Center(child: Text(error.toString())),
|
||||||
loading: buildLoadingIndicator ?? buildDefaultLoadingIndicator,
|
loading: buildLoadingIndicator ?? buildDefaultLoadingIndicator,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user