Skip to content

Commit

Permalink
chore(mobile): comment the usage of the reset variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shenlong-tanwen committed Mar 30, 2024
1 parent de1ef42 commit 13d39a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mobile/lib/modules/backup/views/overnight_upload_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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;
Expand Down

0 comments on commit 13d39a7

Please sign in to comment.