mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
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
|
||||
* ========================================================================================== */
|
||||
|
||||
// A realm instance, for faster future getInstance. Do not use it
|
||||
private var realmLocker: Realm? = null
|
||||
|
||||
// The olm account
|
||||
private var olmAccount: OlmAccount? = null
|
||||
|
||||
@ -199,11 +196,6 @@ internal class RealmCryptoStore @Inject constructor(
|
||||
}
|
||||
|
||||
override fun open() {
|
||||
synchronized(this) {
|
||||
if (realmLocker == null) {
|
||||
realmLocker = Realm.getInstance(realmConfiguration)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun close() {
|
||||
@ -216,9 +208,6 @@ internal class RealmCryptoStore @Inject constructor(
|
||||
}
|
||||
|
||||
olmAccount?.releaseAccount()
|
||||
|
||||
realmLocker?.close()
|
||||
realmLocker = null
|
||||
}
|
||||
|
||||
override fun storeDeviceId(deviceId: String) {
|
||||
|
Loading…
Reference in New Issue
Block a user