[mob] Log n/w when mobileBackUpIsDisabled and backup is happening (#1589)
## Description ## Tests
This commit is contained in:
commit
486d89f506
1 changed files with 9 additions and 3 deletions
|
@ -357,10 +357,16 @@ class FileUploader {
|
|||
final List<ConnectivityResult> connections =
|
||||
await (Connectivity().checkConnectivity());
|
||||
bool canUploadUnderCurrentNetworkConditions = true;
|
||||
if (connections.any((element) => element == ConnectivityResult.mobile)) {
|
||||
canUploadUnderCurrentNetworkConditions =
|
||||
Configuration.instance.shouldBackupOverMobileData();
|
||||
if (!Configuration.instance.shouldBackupOverMobileData()) {
|
||||
if (connections.any((element) => element == ConnectivityResult.mobile)) {
|
||||
canUploadUnderCurrentNetworkConditions = false;
|
||||
} else {
|
||||
_logger.info(
|
||||
"mobileBackupDisabled, backing up with connections: ${connections.map((e) => e.name).toString()}",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (!canUploadUnderCurrentNetworkConditions) {
|
||||
throw WiFiUnavailableError();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue