mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
Make code better readable and add early exit if no folder is enabled
Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
This commit is contained in:
parent
b832c0a706
commit
b121c21406
1 changed files with 6 additions and 1 deletions
|
@ -102,7 +102,12 @@ 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, "Kill Sync Worker since another instance of the worker seems to be running already!")
|
||||
Log_OC.d(TAG, "FILESYNC Kill Sync Worker since another instance of the worker seems to be running already!")
|
||||
return true
|
||||
}
|
||||
|
||||
if (! syncedFolderProvider.syncedFolders.any { it.isEnabled }){
|
||||
Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!")
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue