Merge pull request #112 from astubenbord/bugfix/vpn-connectivity

fix: add vpn to list of states considered as connected to internet
This commit is contained in:
Anton Stubenbord
2023-02-16 17:30:45 +01:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -52,9 +52,15 @@ class ConnectivityStatusServiceImpl implements ConnectivityStatusService {
} }
bool _hasActiveInternetConnection(ConnectivityResult conn) { bool _hasActiveInternetConnection(ConnectivityResult conn) {
return conn == ConnectivityResult.mobile || switch (conn) {
conn == ConnectivityResult.wifi || case ConnectivityResult.wifi:
conn == ConnectivityResult.ethernet; case ConnectivityResult.ethernet:
case ConnectivityResult.mobile:
case ConnectivityResult.vpn:
return true;
default:
return false;
}
} }
@override @override

View File

@@ -284,7 +284,6 @@ class _AuthenticationWrapperState extends State<AuthenticationWrapper> {
ReceiveSharingIntent.getMediaStream() ReceiveSharingIntent.getMediaStream()
.listen(ShareIntentQueue.instance.addAll); .listen(ShareIntentQueue.instance.addAll);
// For sharing files coming from outside the app while the app is closed // For sharing files coming from outside the app while the app is closed
// TODO: This does not work currently, app does not have permission to access the shared file
ReceiveSharingIntent.getInitialMedia() ReceiveSharingIntent.getInitialMedia()
.then(ShareIntentQueue.instance.addAll); .then(ShareIntentQueue.instance.addAll);
} }