mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 21:55:48 +03:00
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:
commit
ea0aa57dfe
3 changed files with 1 additions and 6 deletions
|
@ -173,5 +173,4 @@ interface BackgroundJobManager {
|
|||
fun startOfflineOperations()
|
||||
fun startPeriodicallyOfflineOperation()
|
||||
fun scheduleInternal2WaySync(intervalMinutes: Long)
|
||||
fun cancelInternal2WaySyncJob()
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ class InternalTwoWaySyncActivity :
|
|||
if (isChecked) {
|
||||
backgroundJobManager.scheduleInternal2WaySync(preferences.twoWaySyncInterval)
|
||||
} else {
|
||||
backgroundJobManager.cancelInternal2WaySyncJob()
|
||||
backgroundJobManager.cancelTwoWaySyncJob()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue