mirror of
https://codeberg.org/Mercury-IM/Mercury-IM
synced 2024-06-15 16:14:52 +02:00
Readability fixes
This commit is contained in:
parent
7f2fe135b3
commit
ce1152f0d6
|
@ -29,16 +29,12 @@ public class AndroidPersistenceModule {
|
||||||
@Singleton
|
@Singleton
|
||||||
static ReactiveEntityStore<Persistable> provideDatabase(Application application) {
|
static ReactiveEntityStore<Persistable> provideDatabase(Application application) {
|
||||||
// override onUpgrade to handle migrating to a new version
|
// override onUpgrade to handle migrating to a new version
|
||||||
DatabaseSource source = new DatabaseSource(application, Models.DEFAULT,
|
DatabaseSource source = new DatabaseSource(application, Models.DEFAULT, "mercury_req_db", 1);
|
||||||
"mercury_req_db", 1);
|
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
// use this in development mode to drop and recreate the tables on every upgrade
|
|
||||||
source.setTableCreationMode(TableCreationMode.DROP_CREATE);
|
source.setTableCreationMode(TableCreationMode.DROP_CREATE);
|
||||||
}
|
}
|
||||||
Configuration configuration = source.getConfiguration();
|
Configuration configuration = source.getConfiguration();
|
||||||
ReactiveEntityStore<Persistable> dataStore = ReactiveSupport.toReactiveStore(
|
return ReactiveSupport.toReactiveStore(new EntityDataStore<>(configuration));
|
||||||
new EntityDataStore<>(configuration));
|
|
||||||
return dataStore;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
|
|
Loading…
Reference in a new issue