Merge pull request #13919 from nextcloud/remove-duplicated-func-to-cancel-two-way-sync

Remove Duplicated Cancel Two Way Sync Job Function
This commit is contained in:
Tobias Kaminsky 2024-11-05 08:23:13 +01:00 committed by GitHub
commit ea0aa57dfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 1 additions and 6 deletions

View file

@ -173,5 +173,4 @@ interface BackgroundJobManager {
fun startOfflineOperations()
fun startPeriodicallyOfflineOperation()
fun scheduleInternal2WaySync(intervalMinutes: Long)
fun cancelInternal2WaySyncJob()
}

View file

@ -711,8 +711,4 @@ internal class BackgroundJobManagerImpl(
workManager.enqueueUniquePeriodicWork(JOB_INTERNAL_TWO_WAY_SYNC, ExistingPeriodicWorkPolicy.UPDATE, request)
}
override fun cancelInternal2WaySyncJob() {
workManager.cancelJob(JOB_INTERNAL_TWO_WAY_SYNC)
}
}

View file

@ -181,7 +181,7 @@ class InternalTwoWaySyncActivity :
if (isChecked) {
backgroundJobManager.scheduleInternal2WaySync(preferences.twoWaySyncInterval)
} else {
backgroundJobManager.cancelInternal2WaySyncJob()
backgroundJobManager.cancelTwoWaySyncJob()
}
}
}