Skip to content

Commit

Permalink
Fix log messages
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Mayer <[email protected]>
  • Loading branch information
JonasMayerDev committed May 2, 2024
1 parent 98586fa commit aae1443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,20 @@ class FilesSyncWork(
// or sync worker already running and no changed files to be processed
val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning()
if (alreadyRunning && changedFiles.isNullOrEmpty()) {
Log_OC.d(TAG, "FILESYNC Kill Sync Worker since another instance of the worker seems to be running already!")
Log_OC.d(TAG, "File-sync kill worker since another instance of the worker seems to be running already!")
canExitEarly = true
}

if (!syncedFolderProvider.syncedFolders.any { it.isEnabled }) {
Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!")
Log_OC.d(TAG, "File-sync kill worker since no sync folder is enabled!")
canExitEarly = true
}

if (syncedFolderProvider.syncedFolders.all { it.isChargingOnly } &&
!powerManagementService.battery.isCharging &&
!powerManagementService.battery.isFull
) {
Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!")
Log_OC.d(TAG, "File-sync kill worker since phone is not charging!")
canExitEarly = true
}

Expand Down

0 comments on commit aae1443

Please sign in to comment.