fix: add vpn to list of states considered as connected to internet

This commit is contained in:
Anton Stubenbord
2023-02-16 17:30:00 +01:00
parent cf4e8dc897
commit 555ae21c35
2 changed files with 9 additions and 4 deletions

View File

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

View File

@@ -284,7 +284,6 @@ class _AuthenticationWrapperState extends State<AuthenticationWrapper> {
ReceiveSharingIntent.getMediaStream()
.listen(ShareIntentQueue.instance.addAll);
// 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()
.then(ShareIntentQueue.instance.addAll);
}