Move the Realm init out of the globalscope in hope it fixes crashes
This commit is contained in:
parent
74065afc27
commit
c272eb6059
@ -77,6 +77,7 @@ open class App : Application(), LifecycleObserver {
|
|||||||
Injekt.importModule(AppModule(this))
|
Injekt.importModule(AppModule(this))
|
||||||
|
|
||||||
setupNotificationChannels()
|
setupNotificationChannels()
|
||||||
|
Realm.init(this)
|
||||||
GlobalScope.launch { deleteOldMetadataRealm() } // Delete old metadata DB (EH)
|
GlobalScope.launch { deleteOldMetadataRealm() } // Delete old metadata DB (EH)
|
||||||
// Reprint.initialize(this) //Setup fingerprint (EH)
|
// Reprint.initialize(this) //Setup fingerprint (EH)
|
||||||
if ((BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest") && DebugToggles.ENABLE_DEBUG_OVERLAY.enabled) {
|
if ((BuildConfig.DEBUG || BuildConfig.BUILD_TYPE == "releaseTest") && DebugToggles.ENABLE_DEBUG_OVERLAY.enabled) {
|
||||||
@ -133,7 +134,6 @@ open class App : Application(), LifecycleObserver {
|
|||||||
|
|
||||||
// EXH
|
// EXH
|
||||||
private fun deleteOldMetadataRealm() {
|
private fun deleteOldMetadataRealm() {
|
||||||
Realm.init(this)
|
|
||||||
val config = RealmConfiguration.Builder()
|
val config = RealmConfiguration.Builder()
|
||||||
.name("gallery-metadata.realm")
|
.name("gallery-metadata.realm")
|
||||||
.schemaVersion(3)
|
.schemaVersion(3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user