fix crash on logout
This commit is contained in:
parent
d4fdf7ea80
commit
508092e0a3
|
@ -127,9 +127,6 @@ internal class RealmCryptoStore @Inject constructor(
|
||||||
* Memory cache, to correctly release JNI objects
|
* Memory cache, to correctly release JNI objects
|
||||||
* ========================================================================================== */
|
* ========================================================================================== */
|
||||||
|
|
||||||
// A realm instance, for faster future getInstance. Do not use it
|
|
||||||
private var realmLocker: Realm? = null
|
|
||||||
|
|
||||||
// The olm account
|
// The olm account
|
||||||
private var olmAccount: OlmAccount? = null
|
private var olmAccount: OlmAccount? = null
|
||||||
|
|
||||||
|
@ -199,11 +196,6 @@ internal class RealmCryptoStore @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun open() {
|
override fun open() {
|
||||||
synchronized(this) {
|
|
||||||
if (realmLocker == null) {
|
|
||||||
realmLocker = Realm.getInstance(realmConfiguration)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun close() {
|
override fun close() {
|
||||||
|
@ -216,9 +208,6 @@ internal class RealmCryptoStore @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
olmAccount?.releaseAccount()
|
olmAccount?.releaseAccount()
|
||||||
|
|
||||||
realmLocker?.close()
|
|
||||||
realmLocker = null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun storeDeviceId(deviceId: String) {
|
override fun storeDeviceId(deviceId: String) {
|
||||||
|
|
Loading…
Reference in New Issue