1
0
forked from Cutlery/immich

chore(mobile): comment the usage of the reset variable

This commit is contained in:
shenlong-tanwen 2024-03-30 21:08:31 +05:30
parent 5c3e29440f
commit 12a1e4c9c6
4 changed files with 8 additions and 2 deletions

View File

@ -101,6 +101,8 @@ class _BackupInProgress extends HookWidget {
void onAnimationStateChange(AnimationStatus status) { void onAnimationStateChange(AnimationStatus status) {
if (status == AnimationStatus.completed) { 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; 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(() { useEffect(() {
randomizeAlignment(); randomizeAlignment();
return null; return null;

View File

@ -6,7 +6,7 @@ part of 'map_marker.provider.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$mapMarkersHash() => r'90b00b7f85c54b19f56c7d55d3ad8575c09dab3c'; String _$mapMarkersHash() => r'737d52f3d02e6a458b11d730f2fe522c39ee1ebf';
/// See also [mapMarkers]. /// See also [mapMarkers].
@ProviderFor(mapMarkers) @ProviderFor(mapMarkers)

View File

@ -6,7 +6,7 @@ part of 'map_state.provider.dart';
// RiverpodGenerator // RiverpodGenerator
// ************************************************************************** // **************************************************************************
String _$mapStateNotifierHash() => r'6408d616ec9fc0d1ff26e25692417c43504ff754'; String _$mapStateNotifierHash() => r'87a8623f726d438d115d5a15609c71372726ee2f';
/// See also [MapStateNotifier]. /// See also [MapStateNotifier].
@ProviderFor(MapStateNotifier) @ProviderFor(MapStateNotifier)

View File

@ -225,6 +225,7 @@ class AppRouter extends _$AppRouter {
page: SearchInputRoute.page, page: SearchInputRoute.page,
guards: [_authGuard, _duplicateGuard], guards: [_authGuard, _duplicateGuard],
transitionsBuilder: TransitionsBuilders.noTransition, transitionsBuilder: TransitionsBuilders.noTransition,
),
AutoRoute( AutoRoute(
page: OvernightUploadRoute.page, page: OvernightUploadRoute.page,
guards: [_authGuard, _duplicateGuard], guards: [_authGuard, _duplicateGuard],