From 12a1e4c9c6acbc852b998f8ed0b6952b69024a1d Mon Sep 17 00:00:00 2001 From: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Date: Sat, 30 Mar 2024 21:08:31 +0530 Subject: [PATCH] chore(mobile): comment the usage of the reset variable --- mobile/lib/modules/backup/views/overnight_upload_page.dart | 5 +++++ mobile/lib/modules/map/providers/map_marker.provider.g.dart | 2 +- mobile/lib/modules/map/providers/map_state.provider.g.dart | 2 +- mobile/lib/routing/router.dart | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mobile/lib/modules/backup/views/overnight_upload_page.dart b/mobile/lib/modules/backup/views/overnight_upload_page.dart index ced944224..95563fe10 100644 --- a/mobile/lib/modules/backup/views/overnight_upload_page.dart +++ b/mobile/lib/modules/backup/views/overnight_upload_page.dart @@ -101,6 +101,8 @@ class _BackupInProgress extends HookWidget { void onAnimationStateChange(AnimationStatus status) { if (status == AnimationStatus.completed) { + /// This is used to force a rebuild of the widget to call the randomizeAlignment() method + /// through the useEffect hook which takes care of animating the icon to the new alignment reset.value = !reset.value; } } @@ -122,6 +124,9 @@ class _BackupInProgress extends HookWidget { [], ); + /// The following effect is called on each rebuild of the widget and handles the starts the animation + /// This is also called on screen orientation change and handles updating the alignment and size of the icon + /// accordingly useEffect(() { randomizeAlignment(); return null; diff --git a/mobile/lib/modules/map/providers/map_marker.provider.g.dart b/mobile/lib/modules/map/providers/map_marker.provider.g.dart index 7df6adea9..ce11b4ebf 100644 --- a/mobile/lib/modules/map/providers/map_marker.provider.g.dart +++ b/mobile/lib/modules/map/providers/map_marker.provider.g.dart @@ -6,7 +6,7 @@ part of 'map_marker.provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$mapMarkersHash() => r'90b00b7f85c54b19f56c7d55d3ad8575c09dab3c'; +String _$mapMarkersHash() => r'737d52f3d02e6a458b11d730f2fe522c39ee1ebf'; /// See also [mapMarkers]. @ProviderFor(mapMarkers) diff --git a/mobile/lib/modules/map/providers/map_state.provider.g.dart b/mobile/lib/modules/map/providers/map_state.provider.g.dart index d1b3e54b7..e12c69d71 100644 --- a/mobile/lib/modules/map/providers/map_state.provider.g.dart +++ b/mobile/lib/modules/map/providers/map_state.provider.g.dart @@ -6,7 +6,7 @@ part of 'map_state.provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$mapStateNotifierHash() => r'6408d616ec9fc0d1ff26e25692417c43504ff754'; +String _$mapStateNotifierHash() => r'87a8623f726d438d115d5a15609c71372726ee2f'; /// See also [MapStateNotifier]. @ProviderFor(MapStateNotifier) diff --git a/mobile/lib/routing/router.dart b/mobile/lib/routing/router.dart index 5110356b2..c3b6bae48 100644 --- a/mobile/lib/routing/router.dart +++ b/mobile/lib/routing/router.dart @@ -225,6 +225,7 @@ class AppRouter extends _$AppRouter { page: SearchInputRoute.page, guards: [_authGuard, _duplicateGuard], transitionsBuilder: TransitionsBuilders.noTransition, + ), AutoRoute( page: OvernightUploadRoute.page, guards: [_authGuard, _duplicateGuard],