File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
app/src/main/java/com/nextcloud/client/jobs Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ interface BackgroundJobManager {
165165 fun cancelAllJobs ()
166166 fun schedulePeriodicHealthStatus ()
167167 fun startHealthStatus ()
168- fun bothFilesSyncJobsRunning (syncedFolderID : Long ): Boolean
168+ fun isAutoUploadWorkerRunning (syncedFolderID : Long ): Boolean
169169 fun startOfflineOperations ()
170170 fun startPeriodicallyOfflineOperation ()
171171 fun scheduleInternal2WaySync (intervalMinutes : Long )
Original file line number Diff line number Diff line change @@ -421,8 +421,8 @@ internal class BackgroundJobManagerImpl(
421421 workManager.cancelJob(JOB_PERIODIC_CALENDAR_BACKUP , user)
422422 }
423423
424- override fun bothFilesSyncJobsRunning (syncedFolderID : Long ): Boolean =
425- workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC + " _" + syncedFolderID) &&
424+ override fun isAutoUploadWorkerRunning (syncedFolderID : Long ): Boolean =
425+ workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC + " _" + syncedFolderID) ||
426426 workManager.isWorkRunning(JOB_IMMEDIATE_FILES_SYNC + " _" + syncedFolderID)
427427
428428 override fun startPeriodicallyOfflineOperation () {
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ class AutoUploadWorker(
196196 return true
197197 }
198198
199- if (backgroundJobManager.bothFilesSyncJobsRunning (syncedFolderID)) {
199+ if (backgroundJobManager.isAutoUploadWorkerRunning (syncedFolderID)) {
200200 Log_OC .w(TAG , " 🚧 another worker is already running for $syncedFolderID " )
201201 return true
202202 }
You can’t perform that action at this time.
0 commit comments