Skip to content

Commit

Permalink
Show UI after flashlight init fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Dec 9, 2024
1 parent 2137ea1 commit 8e192b6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/features/vpn/vpn_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 8e192b6

Please sign in to comment.