Fix library update interval not being updated properly
This commit is contained in:
@@ -19,9 +19,9 @@ class LibraryUpdateTrigger : GcmTaskService() {
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun setupTask(context: Context) {
|
||||
fun setupTask(context: Context, prefInterval: Int? = null) {
|
||||
val preferences = Injekt.get<PreferencesHelper>()
|
||||
val interval = preferences.libraryUpdateInterval().getOrDefault()
|
||||
val interval = prefInterval ?: preferences.libraryUpdateInterval().getOrDefault()
|
||||
if (interval > 0) {
|
||||
val restrictions = preferences.libraryUpdateRestriction()
|
||||
val acRestriction = "ac" in restrictions
|
||||
|
||||
Reference in New Issue
Block a user