1
0
mirror of https://github.com/etesync/android synced 2024-11-22 16:08:13 +00:00

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

It seems like this is the cause of #97 as 19b4e2a796
hasn't fixed the issue. Still not sure why it's happening, but reverting
it so no more users suffer from this issue.

This reverts commit 26ea8900a2.
This commit is contained in:
Tom Hacohen 2019-11-11 19:37:10 +02:00
parent 2c8f989278
commit 73179318f3

View File

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