fix spotless

Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
This commit is contained in:
Jonas Mayer 2024-01-16 09:27:29 +01:00 committed by Jonas Mayer
parent aef9a41a5f
commit 24b1fa2da7
3 changed files with 2 additions and 8 deletions

View file

@ -21,7 +21,6 @@ import androidx.work.PeriodicWorkRequest
import androidx.work.WorkInfo
import androidx.work.WorkManager
import androidx.work.workDataOf
import com.google.common.util.concurrent.ListenableFuture
import com.nextcloud.client.account.User
import com.nextcloud.client.core.Clock
import com.nextcloud.client.di.Injectable
@ -32,11 +31,9 @@ import com.nextcloud.client.preferences.AppPreferences
import com.nextcloud.utils.extensions.isWorkRunning
import com.nextcloud.utils.extensions.isWorkScheduled
import com.owncloud.android.datamodel.OCFile
import com.owncloud.android.lib.common.utils.Log_OC
import com.owncloud.android.operations.DownloadType
import java.util.Date
import java.util.UUID
import java.util.concurrent.ExecutionException
import java.util.concurrent.TimeUnit
import kotlin.reflect.KClass
@ -408,7 +405,6 @@ internal class BackgroundJobManagerImpl(
}
override fun bothFilesSyncJobsRunning(): Boolean {
return workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC) &&
workManager.isWorkRunning(JOB_IMMEDIATE_FILES_SYNC)
}

View file

@ -94,8 +94,8 @@ class FilesSyncWork(
@Suppress("MagicNumber")
override fun doWork(): Result {
if (backgroundJobManager.bothFilesSyncJobsRunning()){
Log_OC.d(TAG,"Kill Sync Worker since another instance of the worker seems to be running already!")
if (backgroundJobManager.bothFilesSyncJobsRunning()) {
Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!")
return Result.success()
}
backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class))

View file

@ -54,5 +54,3 @@ fun WorkManager.isWorkRunning(tag: String): Boolean {
return running
}