From fed8d11fb858746a8665fb2aa5111180f419736f Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 10 May 2024 11:40:41 -0500 Subject: [PATCH] refactor(mobile): remove shared module (#9363) --- mobile/lib/main.dart | 2 +- mobile/lib/{shared => utils}/cache/custom_image_cache.dart | 0 mobile/lib/{shared => utils}/cache/widgets_binding.dart | 0 .../utils => utils/hooks}/app_settings_update_hook.dart | 0 mobile/lib/{shared/ui => utils}/hooks/blurhash_hook.dart | 0 .../asset_viewer => utils}/hooks/chewiew_controller_hook.dart | 0 mobile/lib/{shared/ui => utils}/hooks/timer_hook.dart | 0 .../lib/widgets/asset_viewer/custom_video_player_controls.dart | 2 +- mobile/lib/widgets/asset_viewer/video_player.dart | 2 +- mobile/lib/widgets/common/immich_thumbnail.dart | 2 +- mobile/lib/widgets/memories/memory_card.dart | 2 +- mobile/lib/widgets/settings/advanced_settings.dart | 2 +- .../settings/asset_list_settings/asset_list_group_settings.dart | 2 +- .../asset_list_settings/asset_list_layout_settings.dart | 2 +- .../settings/asset_list_settings/asset_list_settings.dart | 2 +- .../lib/widgets/settings/backup_settings/backup_settings.dart | 2 +- mobile/lib/widgets/settings/image_viewer_quality_setting.dart | 2 +- mobile/lib/widgets/settings/notification_setting.dart | 2 +- .../widgets/settings/preference_settings/haptic_setting.dart | 2 +- .../lib/widgets/settings/preference_settings/theme_setting.dart | 2 +- 20 files changed, 14 insertions(+), 14 deletions(-) rename mobile/lib/{shared => utils}/cache/custom_image_cache.dart (100%) rename mobile/lib/{shared => utils}/cache/widgets_binding.dart (100%) rename mobile/lib/{widgets/settings/utils => utils/hooks}/app_settings_update_hook.dart (100%) rename mobile/lib/{shared/ui => utils}/hooks/blurhash_hook.dart (100%) rename mobile/lib/{widgets/asset_viewer => utils}/hooks/chewiew_controller_hook.dart (100%) rename mobile/lib/{shared/ui => utils}/hooks/timer_hook.dart (100%) diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart index b2c10fdace..2a320fbddb 100644 --- a/mobile/lib/main.dart +++ b/mobile/lib/main.dart @@ -16,7 +16,7 @@ import 'package:immich_mobile/entities/backup_album.entity.dart'; import 'package:immich_mobile/entities/duplicated_asset.entity.dart'; import 'package:immich_mobile/routing/router.dart'; import 'package:immich_mobile/routing/tab_navigation_observer.dart'; -import 'package:immich_mobile/shared/cache/widgets_binding.dart'; +import 'package:immich_mobile/utils/cache/widgets_binding.dart'; import 'package:immich_mobile/entities/album.entity.dart'; import 'package:immich_mobile/entities/android_device_asset.entity.dart'; import 'package:immich_mobile/entities/asset.entity.dart'; diff --git a/mobile/lib/shared/cache/custom_image_cache.dart b/mobile/lib/utils/cache/custom_image_cache.dart similarity index 100% rename from mobile/lib/shared/cache/custom_image_cache.dart rename to mobile/lib/utils/cache/custom_image_cache.dart diff --git a/mobile/lib/shared/cache/widgets_binding.dart b/mobile/lib/utils/cache/widgets_binding.dart similarity index 100% rename from mobile/lib/shared/cache/widgets_binding.dart rename to mobile/lib/utils/cache/widgets_binding.dart diff --git a/mobile/lib/widgets/settings/utils/app_settings_update_hook.dart b/mobile/lib/utils/hooks/app_settings_update_hook.dart similarity index 100% rename from mobile/lib/widgets/settings/utils/app_settings_update_hook.dart rename to mobile/lib/utils/hooks/app_settings_update_hook.dart diff --git a/mobile/lib/shared/ui/hooks/blurhash_hook.dart b/mobile/lib/utils/hooks/blurhash_hook.dart similarity index 100% rename from mobile/lib/shared/ui/hooks/blurhash_hook.dart rename to mobile/lib/utils/hooks/blurhash_hook.dart diff --git a/mobile/lib/widgets/asset_viewer/hooks/chewiew_controller_hook.dart b/mobile/lib/utils/hooks/chewiew_controller_hook.dart similarity index 100% rename from mobile/lib/widgets/asset_viewer/hooks/chewiew_controller_hook.dart rename to mobile/lib/utils/hooks/chewiew_controller_hook.dart diff --git a/mobile/lib/shared/ui/hooks/timer_hook.dart b/mobile/lib/utils/hooks/timer_hook.dart similarity index 100% rename from mobile/lib/shared/ui/hooks/timer_hook.dart rename to mobile/lib/utils/hooks/timer_hook.dart diff --git a/mobile/lib/widgets/asset_viewer/custom_video_player_controls.dart b/mobile/lib/widgets/asset_viewer/custom_video_player_controls.dart index 2e1e7f8e64..ebef229dd6 100644 --- a/mobile/lib/widgets/asset_viewer/custom_video_player_controls.dart +++ b/mobile/lib/widgets/asset_viewer/custom_video_player_controls.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/providers/asset_viewer/video_player_controls_provi import 'package:immich_mobile/providers/asset_viewer/video_player_value_provider.dart'; import 'package:immich_mobile/widgets/asset_viewer/center_play_button.dart'; import 'package:immich_mobile/widgets/common/delayed_loading_indicator.dart'; -import 'package:immich_mobile/shared/ui/hooks/timer_hook.dart'; +import 'package:immich_mobile/utils/hooks/timer_hook.dart'; class CustomVideoPlayerControls extends HookConsumerWidget { final Duration hideTimerDuration; diff --git a/mobile/lib/widgets/asset_viewer/video_player.dart b/mobile/lib/widgets/asset_viewer/video_player.dart index 56cb22ea74..076eafdca3 100644 --- a/mobile/lib/widgets/asset_viewer/video_player.dart +++ b/mobile/lib/widgets/asset_viewer/video_player.dart @@ -1,7 +1,7 @@ import 'package:chewie/chewie.dart'; import 'package:flutter/material.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; -import 'package:immich_mobile/widgets/asset_viewer/hooks/chewiew_controller_hook.dart'; +import 'package:immich_mobile/utils/hooks/chewiew_controller_hook.dart'; import 'package:immich_mobile/widgets/asset_viewer/custom_video_player_controls.dart'; import 'package:video_player/video_player.dart'; diff --git a/mobile/lib/widgets/common/immich_thumbnail.dart b/mobile/lib/widgets/common/immich_thumbnail.dart index 0f15c0a11f..2ebead0083 100644 --- a/mobile/lib/widgets/common/immich_thumbnail.dart +++ b/mobile/lib/widgets/common/immich_thumbnail.dart @@ -5,7 +5,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/providers/image/immich_local_thumbnail_provider.dart'; import 'package:immich_mobile/providers/image/immich_remote_thumbnail_provider.dart'; import 'package:immich_mobile/entities/asset.entity.dart'; -import 'package:immich_mobile/shared/ui/hooks/blurhash_hook.dart'; +import 'package:immich_mobile/utils/hooks/blurhash_hook.dart'; import 'package:immich_mobile/widgets/common/immich_image.dart'; import 'package:immich_mobile/widgets/common/thumbhash_placeholder.dart'; import 'package:octo_image/octo_image.dart'; diff --git a/mobile/lib/widgets/memories/memory_card.dart b/mobile/lib/widgets/memories/memory_card.dart index df64b2fddb..fb7cc882a0 100644 --- a/mobile/lib/widgets/memories/memory_card.dart +++ b/mobile/lib/widgets/memories/memory_card.dart @@ -5,7 +5,7 @@ import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/entities/asset.entity.dart'; import 'package:immich_mobile/pages/common/video_viewer.page.dart'; -import 'package:immich_mobile/shared/ui/hooks/blurhash_hook.dart'; +import 'package:immich_mobile/utils/hooks/blurhash_hook.dart'; import 'package:immich_mobile/widgets/common/immich_image.dart'; class MemoryCard extends StatelessWidget { diff --git a/mobile/lib/widgets/settings/advanced_settings.dart b/mobile/lib/widgets/settings/advanced_settings.dart index e79c50bc81..b0727feb0c 100644 --- a/mobile/lib/widgets/settings/advanced_settings.dart +++ b/mobile/lib/widgets/settings/advanced_settings.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/widgets/settings/local_storage_settings.dart'; import 'package:immich_mobile/widgets/settings/settings_slider_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/providers/user.provider.dart'; diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart index 8e63e61e1c..5b09ae8b72 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_group_settings.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/providers/app_settings.provider.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/settings_radio_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_title.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; class GroupSettings extends HookConsumerWidget { const GroupSettings({ diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart index 1224b14d15..4584b7e688 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_layout_settings.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/settings_slider_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; class LayoutSettings extends HookConsumerWidget { const LayoutSettings({ diff --git a/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart b/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart index 9545533d95..cd12ea3eb2 100644 --- a/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart +++ b/mobile/lib/widgets/settings/asset_list_settings/asset_list_settings.dart @@ -6,7 +6,7 @@ import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/asset_list_settings/asset_list_group_settings.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'asset_list_layout_settings.dart'; class AssetListSettings extends HookConsumerWidget { diff --git a/mobile/lib/widgets/settings/backup_settings/backup_settings.dart b/mobile/lib/widgets/settings/backup_settings/backup_settings.dart index 19e031b082..25bcf2d06e 100644 --- a/mobile/lib/widgets/settings/backup_settings/backup_settings.dart +++ b/mobile/lib/widgets/settings/backup_settings/backup_settings.dart @@ -9,7 +9,7 @@ import 'package:immich_mobile/widgets/settings/backup_settings/foreground_settin import 'package:immich_mobile/widgets/settings/settings_button_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'package:immich_mobile/widgets/common/immich_loading_indicator.dart'; class BackupSettings extends HookConsumerWidget { diff --git a/mobile/lib/widgets/settings/image_viewer_quality_setting.dart b/mobile/lib/widgets/settings/image_viewer_quality_setting.dart index af39249e4b..8c45db7863 100644 --- a/mobile/lib/widgets/settings/image_viewer_quality_setting.dart +++ b/mobile/lib/widgets/settings/image_viewer_quality_setting.dart @@ -5,7 +5,7 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; class ImageViewerQualitySetting extends HookWidget { const ImageViewerQualitySetting({ diff --git a/mobile/lib/widgets/settings/notification_setting.dart b/mobile/lib/widgets/settings/notification_setting.dart index c07a80c97a..b7276107e0 100644 --- a/mobile/lib/widgets/settings/notification_setting.dart +++ b/mobile/lib/widgets/settings/notification_setting.dart @@ -8,7 +8,7 @@ import 'package:immich_mobile/widgets/settings/settings_button_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_slider_list_tile.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_page_scaffold.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'package:permission_handler/permission_handler.dart'; class NotificationSetting extends HookConsumerWidget { diff --git a/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart b/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart index 7935002c05..90a123bfbd 100644 --- a/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/haptic_setting.dart @@ -5,7 +5,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; class HapticSetting extends HookConsumerWidget { const HapticSetting({ diff --git a/mobile/lib/widgets/settings/preference_settings/theme_setting.dart b/mobile/lib/widgets/settings/preference_settings/theme_setting.dart index 7bec8fdd45..5780054428 100644 --- a/mobile/lib/widgets/settings/preference_settings/theme_setting.dart +++ b/mobile/lib/widgets/settings/preference_settings/theme_setting.dart @@ -5,7 +5,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:immich_mobile/services/app_settings.service.dart'; import 'package:immich_mobile/widgets/settings/settings_sub_title.dart'; import 'package:immich_mobile/widgets/settings/settings_switch_list_tile.dart'; -import 'package:immich_mobile/widgets/settings/utils/app_settings_update_hook.dart'; +import 'package:immich_mobile/utils/hooks/app_settings_update_hook.dart'; import 'package:immich_mobile/utils/immich_app_theme.dart'; class ThemeSetting extends HookConsumerWidget {