From edd1f49e5754eb871baadafe6fba5cd10c660d9d Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 14 Oct 2022 10:50:40 -0500 Subject: [PATCH 1/5] Update text for foreground backup to make things clearer --- mobile/assets/i18n/en-US.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mobile/assets/i18n/en-US.json b/mobile/assets/i18n/en-US.json index ff313fcbc8..ecdbc6bf46 100644 --- a/mobile/assets/i18n/en-US.json +++ b/mobile/assets/i18n/en-US.json @@ -46,7 +46,7 @@ "backup_controller_page_backup_sub": "Backed up photos and videos", "backup_controller_page_cancel": "Cancel", "backup_controller_page_created": "Created on: {}", - "backup_controller_page_desc_backup": "Turn on backup to automatically upload new assets to the server.", + "backup_controller_page_desc_backup": "Turn on foreground backup to automatically upload new assets to the server when opening the app.", "backup_controller_page_excluded": "Excluded: ", "backup_controller_page_failed": "Failed ({})", "backup_controller_page_filename": "File name: {} [{}]", @@ -58,14 +58,14 @@ "backup_controller_page_select": "Select", "backup_controller_page_server_storage": "Server Storage", "backup_controller_page_start_backup": "Start Backup", - "backup_controller_page_status_off": "Backup is off", - "backup_controller_page_status_on": "Backup is on", + "backup_controller_page_status_off": "Automatic foreground backup is off", + "backup_controller_page_status_on": "Automatic foreground backup is on", "backup_controller_page_storage_format": "{} of {} used", "backup_controller_page_to_backup": "Albums to be backup", "backup_controller_page_total": "Total", "backup_controller_page_total_sub": "All unique photos and videos from selected albums", - "backup_controller_page_turn_off": "Turn off Backup", - "backup_controller_page_turn_on": "Turn on Backup", + "backup_controller_page_turn_off": "Turn off foreground backup", + "backup_controller_page_turn_on": "Turn on foreground backup", "backup_controller_page_uploading_file_info": "Uploading file info", "backup_err_only_album": "Cannot remove the only album", "backup_info_card_assets": "assets", @@ -175,4 +175,4 @@ "experimental_settings_new_asset_list_title": "Enable experimental photo grid", "experimental_settings_new_asset_list_subtitle": "Work in progress", "settings_require_restart": "Please restart Immich to apply this setting" -} \ No newline at end of file +} From 0f51a9794e8f61166f43c7ea3af5752248ae3a14 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 14 Oct 2022 11:15:19 -0500 Subject: [PATCH 2/5] fixed delete dialog colors --- mobile/lib/main.dart | 1 - .../modules/album/ui/album_viewer_appbar.dart | 1 - .../views/select_user_for_sharing_page.dart | 2 +- .../background_service/localization.dart | 8 ++-- .../backup/views/album_preview_page.dart | 6 +-- .../backup/views/backup_controller_page.dart | 11 +++-- .../providers/home_page_state.provider.dart | 2 - .../ui/asset_list_v2/immich_asset_grid.dart | 48 +++++++++++-------- .../lib/modules/home/ui/delete_diaglog.dart | 14 ++++-- mobile/lib/modules/home/ui/image_grid.dart | 1 - .../login/ui/change_password_form.dart | 4 +- mobile/lib/modules/login/ui/login_form.dart | 4 +- .../views/version_announcement_overlay.dart | 4 +- mobile/lib/utils/image_url_builder.dart | 8 ++-- mobile/lib/utils/immich_app_theme.dart | 8 ++-- .../utils/immich_cache_info_repository.dart | 12 +++-- 16 files changed, 77 insertions(+), 57 deletions(-) diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index ee5209b5c2..363908a31f 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -7,7 +7,6 @@ import 'package:flutter/services.dart'; import 'package:flutter_displaymode/flutter_displaymode.dart'; import 'package:hive_flutter/hive_flutter.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/immich_colors.dart'; import 'package:immich_mobile/constants/locales.dart'; import 'package:immich_mobile/modules/backup/background_service/background.service.dart'; import 'package:immich_mobile/modules/backup/models/hive_backup_albums.model.dart'; diff --git a/mobile/lib/modules/album/ui/album_viewer_appbar.dart b/mobile/lib/modules/album/ui/album_viewer_appbar.dart index edfdcade09..ccc23ca72f 100644 --- a/mobile/lib/modules/album/ui/album_viewer_appbar.dart +++ b/mobile/lib/modules/album/ui/album_viewer_appbar.dart @@ -3,7 +3,6 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:fluttertoast/fluttertoast.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/constants/immich_colors.dart'; import 'package:immich_mobile/modules/album/providers/album.provider.dart'; import 'package:immich_mobile/modules/album/providers/album_viewer.provider.dart'; import 'package:immich_mobile/modules/album/providers/asset_selection.provider.dart'; diff --git a/mobile/lib/modules/album/views/select_user_for_sharing_page.dart b/mobile/lib/modules/album/views/select_user_for_sharing_page.dart index 0d21e06484..19f007b35b 100644 --- a/mobile/lib/modules/album/views/select_user_for_sharing_page.dart +++ b/mobile/lib/modules/album/views/select_user_for_sharing_page.dart @@ -151,7 +151,7 @@ class SelectUserForSharingPage extends HookConsumerWidget { actions: [ TextButton( style: TextButton.styleFrom( - primary: Theme.of(context).primaryColor, + foregroundColor: Theme.of(context).primaryColor, ), onPressed: sharedUsersList.value.isEmpty ? null : _createSharedAlbum, diff --git a/mobile/lib/modules/backup/background_service/localization.dart b/mobile/lib/modules/backup/background_service/localization.dart index 27a74d4cf4..1e8c9142ed 100644 --- a/mobile/lib/modules/backup/background_service/localization.dart +++ b/mobile/lib/modules/backup/background_service/localization.dart @@ -21,7 +21,9 @@ Future loadTranslations() async { await controller.loadTranslations(); - return Localization.load(controller.locale, - translations: controller.translations, - fallbackTranslations: controller.fallbackTranslations); + return Localization.load( + controller.locale, + translations: controller.translations, + fallbackTranslations: controller.fallbackTranslations, + ); } diff --git a/mobile/lib/modules/backup/views/album_preview_page.dart b/mobile/lib/modules/backup/views/album_preview_page.dart index 2266fe8bcc..afca75be1f 100644 --- a/mobile/lib/modules/backup/views/album_preview_page.dart +++ b/mobile/lib/modules/backup/views/album_preview_page.dart @@ -16,8 +16,8 @@ class AlbumPreviewPage extends HookConsumerWidget { final assets = useState>([]); _getAssetsInAlbum() async { - assets.value = - await album.getAssetListRange(start: 0, end: album.assetCount); + assets.value = await album.getAssetListRange( + start: 0, end: await album.assetCountAsync); } useEffect( @@ -34,7 +34,7 @@ class AlbumPreviewPage extends HookConsumerWidget { title: Column( children: [ Text( - "${album.name} (${album.assetCount})", + "${album.name} (${album.assetCountAsync})", style: const TextStyle(fontSize: 14, fontWeight: FontWeight.bold), ), Padding( diff --git a/mobile/lib/modules/backup/views/backup_controller_page.dart b/mobile/lib/modules/backup/views/backup_controller_page.dart index 34fdc591d7..6f668576b9 100644 --- a/mobile/lib/modules/backup/views/backup_controller_page.dart +++ b/mobile/lib/modules/backup/views/backup_controller_page.dart @@ -158,7 +158,6 @@ class BackupControllerPage extends HookConsumerWidget { } void _showBatteryOptimizationInfoToUser() { - final buttonTextColor = Theme.of(context).primaryColor; showDialog( context: context, barrierDismissible: false, @@ -173,13 +172,14 @@ class BackupControllerPage extends HookConsumerWidget { ).tr(), ), actions: [ - OutlinedButton( + ElevatedButton( onPressed: () => launchUrl( Uri.parse('https://dontkillmyapp.com'), mode: LaunchMode.externalApplication, ), child: const Text( "backup_controller_page_background_battery_info_link", + style: TextStyle(fontWeight: FontWeight.bold, fontSize: 12), ).tr(), ), ElevatedButton( @@ -220,7 +220,12 @@ class BackupControllerPage extends HookConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ if (!isBackgroundEnabled) - const Text("backup_controller_page_background_description").tr(), + Padding( + padding: const EdgeInsets.symmetric(vertical: 8.0), + child: + const Text("backup_controller_page_background_description") + .tr(), + ), if (isBackgroundEnabled) SwitchListTile( title: diff --git a/mobile/lib/modules/home/providers/home_page_state.provider.dart b/mobile/lib/modules/home/providers/home_page_state.provider.dart index 974706d361..26cee6d5ae 100644 --- a/mobile/lib/modules/home/providers/home_page_state.provider.dart +++ b/mobile/lib/modules/home/providers/home_page_state.provider.dart @@ -1,4 +1,3 @@ -import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/modules/home/models/home_page_state.model.dart'; @@ -7,7 +6,6 @@ import 'package:immich_mobile/shared/ui/share_dialog.dart'; import 'package:openapi/api.dart'; class HomePageStateNotifier extends StateNotifier { - final ShareService _shareService; HomePageStateNotifier(this._shareService) diff --git a/mobile/lib/modules/home/ui/asset_list_v2/immich_asset_grid.dart b/mobile/lib/modules/home/ui/asset_list_v2/immich_asset_grid.dart index 4a085f3bf2..6a935fb5e4 100644 --- a/mobile/lib/modules/home/ui/asset_list_v2/immich_asset_grid.dart +++ b/mobile/lib/modules/home/ui/asset_list_v2/immich_asset_grid.dart @@ -1,10 +1,6 @@ -import 'dart:math'; - import 'package:collection/collection.dart'; import 'package:easy_localization/easy_localization.dart'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/src/widgets/framework.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/modules/home/providers/home_page_render_list_provider.dart'; @@ -52,7 +48,9 @@ class ImmichAssetGrid extends HookConsumerWidget { } Widget _buildThumbnailOrPlaceholder( - AssetResponseDto asset, bool placeholder) { + AssetResponseDto asset, + bool placeholder, + ) { if (placeholder) { return const DecoratedBox( decoration: BoxDecoration(color: Colors.grey), @@ -67,7 +65,10 @@ class ImmichAssetGrid extends HookConsumerWidget { } Widget _buildAssetRow( - BuildContext context, RenderAssetGridRow row, bool scrolling) { + BuildContext context, + RenderAssetGridRow row, + bool scrolling, + ) { double size = _getItemSize(context); return Row( @@ -87,7 +88,10 @@ class ImmichAssetGrid extends HookConsumerWidget { } Widget _buildTitle( - BuildContext context, String title, List assets) { + BuildContext context, + String title, + List assets, + ) { return DailyTitleText( isoDate: title, assetGroup: assets, @@ -128,7 +132,8 @@ class ImmichAssetGrid extends HookConsumerWidget { Text _labelBuilder(int pos) { final date = renderList[pos].date; - return Text(DateFormat.yMMMd().format(date), + return Text( + DateFormat.yMMMd().format(date), style: const TextStyle( color: Colors.white, fontWeight: FontWeight.bold, @@ -149,19 +154,20 @@ class ImmichAssetGrid extends HookConsumerWidget { } return DraggableScrollbar.semicircle( - scrollStateListener: dragScrolling, + scrollStateListener: dragScrolling, + itemPositionsListener: _itemPositionsListener, + controller: _itemScrollController, + backgroundColor: Theme.of(context).hintColor, + labelTextBuilder: _labelBuilder, + labelConstraints: const BoxConstraints(maxHeight: 28), + scrollbarAnimationDuration: const Duration(seconds: 1), + scrollbarTimeToFade: const Duration(seconds: 4), + child: ScrollablePositionedList.builder( + itemBuilder: itemBuilder, itemPositionsListener: _itemPositionsListener, - controller: _itemScrollController, - backgroundColor: Theme.of(context).hintColor, - labelTextBuilder: _labelBuilder, - labelConstraints: const BoxConstraints(maxHeight: 28), - scrollbarAnimationDuration: const Duration(seconds: 1), - scrollbarTimeToFade: const Duration(seconds: 4), - child: ScrollablePositionedList.builder( - itemBuilder: itemBuilder, - itemPositionsListener: _itemPositionsListener, - itemScrollController: _itemScrollController, - itemCount: renderList.length, - )); + itemScrollController: _itemScrollController, + itemCount: renderList.length, + ), + ); } } diff --git a/mobile/lib/modules/home/ui/delete_diaglog.dart b/mobile/lib/modules/home/ui/delete_diaglog.dart index 3adef135a8..8c8454269c 100644 --- a/mobile/lib/modules/home/ui/delete_diaglog.dart +++ b/mobile/lib/modules/home/ui/delete_diaglog.dart @@ -12,7 +12,7 @@ class DeleteDialog extends ConsumerWidget { final homePageState = ref.watch(homePageStateProvider); return AlertDialog( - backgroundColor: Colors.grey[200], + // backgroundColor: Colors.grey[200], shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), title: const Text("delete_dialog_title").tr(), content: const Text("delete_dialog_alert").tr(), @@ -21,9 +21,12 @@ class DeleteDialog extends ConsumerWidget { onPressed: () { Navigator.of(context).pop(); }, - child: const Text( + child: Text( "delete_dialog_cancel", - style: TextStyle(color: Colors.blueGrey), + style: TextStyle( + color: Theme.of(context).primaryColor, + fontWeight: FontWeight.bold, + ), ).tr(), ), TextButton( @@ -37,7 +40,10 @@ class DeleteDialog extends ConsumerWidget { }, child: Text( "delete_dialog_ok", - style: TextStyle(color: Colors.red[400]), + style: TextStyle( + color: Colors.red[400], + fontWeight: FontWeight.bold, + ), ).tr(), ), ], diff --git a/mobile/lib/modules/home/ui/image_grid.dart b/mobile/lib/modules/home/ui/image_grid.dart index f7efe613d2..093d5c6130 100644 --- a/mobile/lib/modules/home/ui/image_grid.dart +++ b/mobile/lib/modules/home/ui/image_grid.dart @@ -30,7 +30,6 @@ class ImageGrid extends ConsumerWidget { ), delegate: SliverChildBuilderDelegate( (BuildContext context, int index) { - var assetType = assetGroup[index].type; return GestureDetector( onTap: () {}, child: ThumbnailImage( diff --git a/mobile/lib/modules/login/ui/change_password_form.dart b/mobile/lib/modules/login/ui/change_password_form.dart index 0351803d43..3773237567 100644 --- a/mobile/lib/modules/login/ui/change_password_form.dart +++ b/mobile/lib/modules/login/ui/change_password_form.dart @@ -142,8 +142,8 @@ class ChangePasswordButton extends ConsumerWidget { return ElevatedButton( style: ElevatedButton.styleFrom( visualDensity: VisualDensity.standard, - primary: Theme.of(context).primaryColor, - onPrimary: Colors.grey[50], + backgroundColor: Theme.of(context).primaryColor, + foregroundColor: Colors.grey[50], elevation: 2, padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25), ), diff --git a/mobile/lib/modules/login/ui/login_form.dart b/mobile/lib/modules/login/ui/login_form.dart index dad98505df..669ac45abb 100644 --- a/mobile/lib/modules/login/ui/login_form.dart +++ b/mobile/lib/modules/login/ui/login_form.dart @@ -203,8 +203,8 @@ class LoginButton extends ConsumerWidget { return ElevatedButton( style: ElevatedButton.styleFrom( visualDensity: VisualDensity.standard, - primary: Theme.of(context).primaryColor, - onPrimary: Colors.grey[50], + backgroundColor: Theme.of(context).primaryColor, + foregroundColor: Colors.grey[50], elevation: 2, padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25), ), diff --git a/mobile/lib/shared/views/version_announcement_overlay.dart b/mobile/lib/shared/views/version_announcement_overlay.dart index aa56bd8fbd..d066be676d 100644 --- a/mobile/lib/shared/views/version_announcement_overlay.dart +++ b/mobile/lib/shared/views/version_announcement_overlay.dart @@ -103,8 +103,8 @@ class VersionAnnouncementOverlay extends HookConsumerWidget { style: ElevatedButton.styleFrom( shape: const StadiumBorder(), visualDensity: VisualDensity.standard, - primary: Colors.indigo, - onPrimary: Colors.grey[50], + backgroundColor: Colors.indigo, + foregroundColor: Colors.grey[50], elevation: 2, padding: const EdgeInsets.symmetric( vertical: 10, diff --git a/mobile/lib/utils/image_url_builder.dart b/mobile/lib/utils/image_url_builder.dart index 5d6ac302bc..c28bef82f5 100644 --- a/mobile/lib/utils/image_url_builder.dart +++ b/mobile/lib/utils/image_url_builder.dart @@ -25,9 +25,11 @@ String getImageUrl(final AssetResponseDto asset) { return '${box.get(serverEndpointKey)}/asset/file?aid=${asset.deviceAssetId}&did=${asset.deviceId}&isThumb=false'; } -String _getThumbnailUrl(final String id, - {ThumbnailFormat type = ThumbnailFormat.WEBP}) { +String _getThumbnailUrl( + final String id, { + ThumbnailFormat type = ThumbnailFormat.WEBP, +}) { final box = Hive.box(userInfoBox); - return '${box.get(serverEndpointKey)}/asset/thumbnail/${id}?format=${type.value}'; + return '${box.get(serverEndpointKey)}/asset/thumbnail/$id?format=${type.value}'; } diff --git a/mobile/lib/utils/immich_app_theme.dart b/mobile/lib/utils/immich_app_theme.dart index 64daafe0de..28bfc19bb6 100644 --- a/mobile/lib/utils/immich_app_theme.dart +++ b/mobile/lib/utils/immich_app_theme.dart @@ -72,8 +72,8 @@ ThemeData immichDarkTheme = ThemeData( cardColor: Colors.grey[900], elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom( - onPrimary: Colors.black87, - primary: immichDarkThemePrimaryColor, + foregroundColor: Colors.black87, + backgroundColor: immichDarkThemePrimaryColor, ), ), ); @@ -126,8 +126,8 @@ ThemeData immichLightTheme = ThemeData( ), elevatedButtonTheme: ElevatedButtonThemeData( style: ElevatedButton.styleFrom( - primary: Colors.indigo, - onPrimary: Colors.white, + backgroundColor: Colors.indigo, + foregroundColor: Colors.white, ), ), ); diff --git a/mobile/lib/utils/immich_cache_info_repository.dart b/mobile/lib/utils/immich_cache_info_repository.dart index 3b0240247a..87a17ac0b4 100644 --- a/mobile/lib/utils/immich_cache_info_repository.dart +++ b/mobile/lib/utils/immich_cache_info_repository.dart @@ -112,8 +112,10 @@ class ImmichCacheInfoRepository extends ImmichCacheRepository { } @override - Future insert(CacheObject cacheObject, - {bool setTouchedToNow = true}) async { + Future insert( + CacheObject cacheObject, { + bool setTouchedToNow = true, + }) async { int newId = keyLookupHiveBox.length == 0 ? 0 : keyLookupHiveBox.values.reduce(max) + 1; @@ -144,8 +146,10 @@ class ImmichCacheInfoRepository extends ImmichCacheRepository { } @override - Future update(CacheObject cacheObject, - {bool setTouchedToNow = true}) async { + Future update( + CacheObject cacheObject, { + bool setTouchedToNow = true, + }) async { if (cacheObject.id != null) { cacheObjectLookupBox.put(cacheObject.id, cacheObject.toMap()); return 1; From c88e5f9be2289072a9ec4a0099d4637ef0b77917 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 14 Oct 2022 11:26:10 -0500 Subject: [PATCH 3/5] Add haptic feedback on swiping asset --- mobile/lib/modules/asset_viewer/views/gallery_viewer.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart index ab7bde1b7a..13012d6938 100644 --- a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart +++ b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart @@ -1,5 +1,6 @@ import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_swipe_detector/flutter_swipe_detector.dart'; import 'package:hive/hive.dart'; @@ -111,6 +112,9 @@ class GalleryViewerPage extends HookConsumerWidget { : const BouncingScrollPhysics(), itemCount: assetList.length, scrollDirection: Axis.horizontal, + onPageChanged: (value) { + HapticFeedback.selectionClick(); + }, itemBuilder: (context, index) { initState(index); From e99c400f5971b1bde75e6e0b36e06551873b9b03 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 14 Oct 2022 16:04:21 -0500 Subject: [PATCH 4/5] Added haptic feedback to tab bar switching --- mobile/lib/shared/views/tab_controller_page.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/mobile/lib/shared/views/tab_controller_page.dart b/mobile/lib/shared/views/tab_controller_page.dart index 0b0634ae0e..16d52f69a3 100644 --- a/mobile/lib/shared/views/tab_controller_page.dart +++ b/mobile/lib/shared/views/tab_controller_page.dart @@ -34,6 +34,7 @@ class TabControllerPage extends ConsumerWidget { bottomNavigationBar: multiselectEnabled ? null : BottomNavigationBar( + enableFeedback: true, selectedLabelStyle: const TextStyle( fontSize: 13, fontWeight: FontWeight.w600, From f05d5bdb9e527b0112d23ad046062603a65eb739 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Fri, 14 Oct 2022 16:13:35 -0500 Subject: [PATCH 5/5] Added haptic feedback to incorect login --- .../lib/modules/login/providers/authentication.provider.dart | 2 ++ mobile/lib/shared/views/tab_controller_page.dart | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mobile/lib/modules/login/providers/authentication.provider.dart b/mobile/lib/modules/login/providers/authentication.provider.dart index 2ccf616a7b..022faf49ec 100644 --- a/mobile/lib/modules/login/providers/authentication.provider.dart +++ b/mobile/lib/modules/login/providers/authentication.provider.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:hive/hive.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/constants/hive_box.dart'; @@ -120,6 +121,7 @@ class AuthenticationNotifier extends StateNotifier { .delete(savedLoginInfoKey); } } catch (e) { + HapticFeedback.vibrate(); debugPrint("Error logging in $e"); return false; } diff --git a/mobile/lib/shared/views/tab_controller_page.dart b/mobile/lib/shared/views/tab_controller_page.dart index 16d52f69a3..83435edc4c 100644 --- a/mobile/lib/shared/views/tab_controller_page.dart +++ b/mobile/lib/shared/views/tab_controller_page.dart @@ -1,6 +1,7 @@ import 'package:auto_route/auto_route.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/modules/home/providers/multiselect.provider.dart'; import 'package:immich_mobile/routing/router.dart'; @@ -34,7 +35,6 @@ class TabControllerPage extends ConsumerWidget { bottomNavigationBar: multiselectEnabled ? null : BottomNavigationBar( - enableFeedback: true, selectedLabelStyle: const TextStyle( fontSize: 13, fontWeight: FontWeight.w600, @@ -45,6 +45,7 @@ class TabControllerPage extends ConsumerWidget { ), currentIndex: tabsRouter.activeIndex, onTap: (index) { + HapticFeedback.selectionClick(); tabsRouter.setActiveIndex(index); }, items: [