Skip to content

Commit

Permalink
fix spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Mayer <[email protected]>
  • Loading branch information
JonasMayerDev authored and ZetaTom committed Jul 3, 2024
1 parent aca3ab8 commit cfd7340
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class FileUploadHelper {
}.map { it.name }.toHashSet()

for (failedUpload in failedUploads) {

if (!accountNames.contains(failedUpload.accountName)) {
uploadsStorageManager.removeUpload(failedUpload)
continue
Expand All @@ -137,7 +136,7 @@ class FileUploadHelper {
checkUploadConditions(failedUpload, connectivity, battery, powerManagementService, hasGeneralConnection)

if (conditions != UploadResult.UPLOADED) {
if (failedUpload.lastResult != conditions){
if (failedUpload.lastResult != conditions) {
failedUpload.lastResult = conditions
uploadsStorageManager.updateUpload(failedUpload)
}
Expand All @@ -149,7 +148,6 @@ class FileUploadHelper {

failedUpload.uploadStatus = UploadStatus.UPLOAD_IN_PROGRESS
uploadsStorageManager.updateUpload(failedUpload)

}

accountNames.forEach {
Expand Down Expand Up @@ -229,7 +227,6 @@ class FileUploadHelper {
private fun checkConnectivity(connectivityService: ConnectivityService): Boolean {
// check that internet is not behind walled garden
return connectivityService.getConnectivity().isConnected && !connectivityService.isInternetWalled()

}

/**
Expand All @@ -243,7 +240,6 @@ class FileUploadHelper {
powerManagementService: PowerManagementService,
hasGeneralConnection: Boolean
): UploadResult {

var conditions = UploadResult.UPLOADED

// check that internet is available
Expand All @@ -252,7 +248,7 @@ class FileUploadHelper {
}

// check that local file exists and skip the upload otherwise
if (!File(upload.localPath).exists()){
if (!File(upload.localPath).exists()) {
conditions = UploadResult.FILE_NOT_FOUND
}

Expand All @@ -262,7 +258,7 @@ class FileUploadHelper {
}

// check if charging conditions are met and delays the upload otherwise
if (upload.isWhileChargingOnly && !battery.isCharging && !battery.isFull){
if (upload.isWhileChargingOnly && !battery.isCharging && !battery.isFull) {
conditions = UploadResult.DELAYED_FOR_CHARGING
}

Expand Down

0 comments on commit cfd7340

Please sign in to comment.