mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-14 14:12:21 -06:00
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:
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user