Cleanup after merging
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
package org.koitharu.kotatsu.core.db
|
||||
|
||||
import androidx.room.InvalidationTracker
|
||||
import org.koin.android.ext.koin.androidContext
|
||||
import org.koin.dsl.module
|
||||
|
||||
val databaseModule
|
||||
get() = module {
|
||||
single {
|
||||
MangaDatabase(androidContext()).also { db ->
|
||||
getAll<InvalidationTracker.Observer>().forEach {
|
||||
db.invalidationTracker.addObserver(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
single { MangaDatabase(androidContext()) }
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class SyncController(
|
||||
private val mutex = Mutex()
|
||||
private val jobs = ArrayMap<String, Job>(2)
|
||||
private val defaultGcPeriod: Long // gc period if sync disabled
|
||||
get() = TimeUnit.DAYS.toMillis(2)
|
||||
get() = TimeUnit.HOURS.toMillis(2)
|
||||
|
||||
override fun onInvalidated(tables: MutableSet<String>) {
|
||||
requestSync(
|
||||
@@ -136,4 +136,4 @@ class SyncController(
|
||||
favouriteCategoriesDao.gc(deletedAt)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user