Sync only while the app is open.
This commit is contained in:
1 parent
f2dac546d0
commit
ee1079a079
7 files changed
+3
-54
No files matched your search
@@ -18,8 +18,7 @@ open class RacingApp : Application() {
|
||||
val dao = AppDatabase.create(this).raceDao()
|
||||
val preferences = SyncPreferences(this)
|
||||
runBlocking(Dispatchers.IO) { ensureCars(dao, preferences) }
|
||||
val sync = PitSync(this, dao, preferences)
|
||||
val sync = PitSync(dao, preferences)
|
||||
repository = Repository(dao, sync, preferences)
|
||||
sync.schedule()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user