Revert "Revert "App: only init the data store once per application.""

A lot of reverts. :)

According to more information and testing in #97, this was indeed
unrelated and 1.9.3 was enough to fix it.

This reverts commit 73179318f3.
pull/104/head
Tom Hacohen 5 years ago
parent e860a37bf7
commit da3ac48bbf

@ -51,8 +51,7 @@ class App : Application() {
* `@Provides @Singleton`.
*/
// override onUpgrade to handle migrating to a new version
val data: MyEntityDataStore
get() = initDataStore()
val data = initDataStore()
fun initDataStore(): MyEntityDataStore {
val source = MyDatabaseSource(this, Models.DEFAULT, 4)

Loading…
Cancel
Save