Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Timer animation fixed

Aman Raj Singh Mourya92e89d3589d1
diff --git a/mobile/lib/ui/tools/lock_screen.dart b/mobile/lib/ui/tools/lock_screen.dart
index e4e4a041bc..913a20fb86 100644
--- a/mobile/lib/ui/tools/lock_screen.dart
+++ b/mobile/lib/ui/tools/lock_screen.dart
@@ -35,16 +35,7 @@ class _LockScreenState extends State<LockScreen>
int lockedTimeInSeconds = 0;
int invalidAttemptCount = 0;
int remainingTimeInSeconds = 0;
- bool showErrorMessage = true;
final _lockscreenSetting = LockScreenSettings.instance;
- late final AnimationController _controller = AnimationController(
- duration: const Duration(milliseconds: 500),
- vsync: this,
- );
- late final animation = CurvedAnimation(
- parent: _controller,
- curve: Curves.easeInOut,
- );
late Brightness _platformBrightness;
@override
@@ -126,9 +117,13 @@ class _LockScreenState extends State<LockScreen>
child: TweenAnimationBuilder<double>(
tween: Tween<double>(
begin: 0,
- end: _getFractionOfTimeElapsed(),
+ end: isTimerRunning
+ ? _getFractionOfTimeElapsed()
+ : 1,
),
- duration: const Duration(seconds: 1),
+ duration: isTimerRunning
+ ? const Duration(seconds: 1)
+ : const Duration(seconds: 1),
builder: (context, value, _) =>
CircularProgressIndicator(
backgroundColor: colorTheme.fillFaintPressed,