Pass context to get WorkManager instance
This commit is contained in:
@@ -106,7 +106,7 @@ class SettingsBackupController : SettingsController() {
|
||||
|
||||
onChange { newValue ->
|
||||
val interval = (newValue as String).toInt()
|
||||
BackupCreatorJob.setupTask(interval)
|
||||
BackupCreatorJob.setupTask(context, interval)
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class SettingsLibraryController : SettingsController() {
|
||||
|
||||
onChange { newValue ->
|
||||
val interval = (newValue as String).toInt()
|
||||
LibraryUpdateJob.setupTask(interval)
|
||||
LibraryUpdateJob.setupTask(context, interval)
|
||||
true
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ class SettingsLibraryController : SettingsController() {
|
||||
|
||||
onChange {
|
||||
// Post to event looper to allow the preference to be updated.
|
||||
Handler().post { LibraryUpdateJob.setupTask() }
|
||||
Handler().post { LibraryUpdateJob.setupTask(context) }
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user