mirror of
https://github.com/etesync/android
synced 2024-12-23 07:08:16 +00:00
App: only init the data store once per application.
We were accidentally initialising it once every time we were trying to access it.
This commit is contained in:
parent
9ed172e23c
commit
26ea8900a2
@ -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…
Reference in New Issue
Block a user