Moves the ContactList cache lists to AccountViewModel, where it can be disposed more efficiently.

This commit is contained in:
Vitor Pamplona
2024-08-06 15:36:04 -04:00
parent e5328d7975
commit 5fdff97cf8
11 changed files with 74 additions and 100 deletions
@@ -20,6 +20,7 @@
*/
package com.vitorpamplona.quartz.crypto
import com.vitorpamplona.quartz.encoders.HexKey
import com.vitorpamplona.quartz.encoders.toHexKey
class KeyPair(
@@ -29,6 +30,7 @@ class KeyPair(
) {
val privKey: ByteArray?
val pubKey: ByteArray
val pubKeyHex: HexKey
init {
if (privKey == null) {
@@ -52,6 +54,8 @@ class KeyPair(
this.pubKey = pubKey
}
}
this.pubKeyHex = this.pubKey.toHexKey().intern()
}
override fun toString(): String = "KeyPair(privateKey=${privKey?.toHexKey()}, publicKey=${pubKey.toHexKey()}"