Skip to content

Commit

Permalink
Fixed connectivity warning issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Jun 19, 2024
1 parent 494f691 commit 4adae43
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,22 @@ class _LanternAppState extends State<LanternApp>
if (!hasConnection) {
return;
}
final vpnConnected = await vpnModel.isVpnConnected();

/// If vpn is not connected then we should not show the connectivity warning
if(!vpnConnected){
return;
}
final shouldShowConnectivityWarning =
(sessionModel.proxyAvailable.value != null &&
sessionModel.proxyAvailable.value == false);

if (shouldShowConnectivityWarning != showConnectivityWarning) {
showConnectivityWarning = shouldShowConnectivityWarning;
if (showConnectivityWarning) {
networkWarningAnimationController.forward();
} else {
print("networkWarningAnimationController reverse");
networkWarningAnimationController.reverse();
}
// Update the state after running the animations.
Expand Down

0 comments on commit 4adae43

Please # to comment.