diff --git a/lib/features/vpn/vpn_notifier.dart b/lib/features/vpn/vpn_notifier.dart index 179bbc64b..79d1be49a 100644 --- a/lib/features/vpn/vpn_notifier.dart +++ b/lib/features/vpn/vpn_notifier.dart @@ -42,8 +42,17 @@ class VPNChangeNotifier with ChangeNotifier { if (configNotifier == null) { return; } + + if (timer!.tick >= 6) { + // Timer has reached 6 seconds + // Stop the timer and set isFlashlightInitialized to true + appLogger.i("flashlight fail initialized"); + isFlashlightInitialized = true; + isFlashlightInitializedFailed = true; + notifyListeners(); + } updateStatus( - configNotifier.fetchedProxiesConfig, + false, configNotifier.fetchedGlobalConfig, configNotifier.hasSucceedingProxy); });