Skip to content

Commit aad5c3b

Browse files
authored
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.
1 parent b275310 commit aad5c3b

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

mobile/lib/pages/search/search.page.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,7 @@ class SearchResultGrid extends StatelessWidget {
768768
editEnabled: true,
769769
favoriteEnabled: true,
770770
stackEnabled: false,
771+
dragScrollLabelEnabled: false,
771772
emptyIndicator: Padding(
772773
padding: const EdgeInsets.symmetric(horizontal: 16.0),
773774
child: !isSearching

mobile/lib/widgets/asset_grid/immich_asset_grid.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class ImmichAssetGrid extends HookConsumerWidget {
3232
final Widget? topWidget;
3333
final bool shrinkWrap;
3434
final bool showDragScroll;
35+
final bool showDragScrollLabel;
3536
final bool showStack;
3637

3738
const ImmichAssetGrid({
@@ -52,6 +53,7 @@ class ImmichAssetGrid extends HookConsumerWidget {
5253
this.topWidget,
5354
this.shrinkWrap = false,
5455
this.showDragScroll = true,
56+
this.showDragScrollLabel = true,
5557
this.showStack = false,
5658
});
5759

@@ -119,6 +121,7 @@ class ImmichAssetGrid extends HookConsumerWidget {
119121
shrinkWrap: shrinkWrap,
120122
showDragScroll: showDragScroll,
121123
showStack: showStack,
124+
showLabel: showDragScrollLabel,
122125
),
123126
);
124127
}

mobile/lib/widgets/asset_grid/immich_asset_grid_view.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
5858
final bool shrinkWrap;
5959
final bool showDragScroll;
6060
final bool showStack;
61+
final bool showLabel;
6162

6263
const ImmichAssetGridView({
6364
super.key,
@@ -78,6 +79,7 @@ class ImmichAssetGridView extends ConsumerStatefulWidget {
7879
this.shrinkWrap = false,
7980
this.showDragScroll = true,
8081
this.showStack = false,
82+
this.showLabel = true,
8183
});
8284

8385
@override
@@ -284,7 +286,7 @@ class ImmichAssetGridViewState extends ConsumerState<ImmichAssetGridView> {
284286
backgroundColor: context.isDarkTheme
285287
? context.colorScheme.primary.darken(amount: .5)
286288
: context.colorScheme.primary,
287-
labelTextBuilder: _labelBuilder,
289+
labelTextBuilder: widget.showLabel ? _labelBuilder : null,
288290
padding: appBarOffset()
289291
? const EdgeInsets.only(top: 60)
290292
: const EdgeInsets.only(),

mobile/lib/widgets/asset_grid/multiselect_grid.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class MultiselectGrid extends HookConsumerWidget {
3535
this.onRemoveFromAlbum,
3636
this.topWidget,
3737
this.stackEnabled = false,
38+
this.dragScrollLabelEnabled = true,
3839
this.archiveEnabled = false,
3940
this.deleteEnabled = true,
4041
this.favoriteEnabled = true,
@@ -50,6 +51,7 @@ class MultiselectGrid extends HookConsumerWidget {
5051
final Future<bool> Function(Iterable<Asset>)? onRemoveFromAlbum;
5152
final Widget? topWidget;
5253
final bool stackEnabled;
54+
final bool dragScrollLabelEnabled;
5355
final bool archiveEnabled;
5456
final bool unarchive;
5557
final bool deleteEnabled;
@@ -429,6 +431,7 @@ class MultiselectGrid extends HookConsumerWidget {
429431
),
430432
topWidget: topWidget,
431433
showStack: stackEnabled,
434+
showDragScrollLabel: dragScrollLabelEnabled,
432435
),
433436
error: (error, _) => Center(child: Text(error.toString())),
434437
loading: buildLoadingIndicator ?? buildDefaultLoadingIndicator,

0 commit comments

Comments
 (0)