1
0
mirror of https://github.com/etesync/android synced 2024-11-25 17:38:13 +00:00

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

Even more reverts. :(
After additional testing (based on user reports) it seems like this may
still be causing issues. I find it weird and don't understand why, but
I'm reverting this as a precaution so people aren't affected.

Related to #97

This reverts commit da3ac48bbf.
This commit is contained in:
Tom Hacohen 2019-12-17 10:08:40 +02:00
parent 591a37da9b
commit 72253932d3

View File

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