Rename store API
This commit is contained in:
parent
be488ae75a
commit
7a7c292b3c
@ -315,7 +315,7 @@ internal class DefaultCryptoService @Inject constructor(
|
|||||||
// Open the store
|
// Open the store
|
||||||
cryptoStore.open()
|
cryptoStore.open()
|
||||||
|
|
||||||
if (!cryptoStore.getDeviceKeysUploaded()) {
|
if (!cryptoStore.areDeviceKeysUploaded()) {
|
||||||
// Schedule upload of OTK
|
// Schedule upload of OTK
|
||||||
oneTimeKeysUploader.updateOneTimeKeyCount(0)
|
oneTimeKeysUploader.updateOneTimeKeyCount(0)
|
||||||
}
|
}
|
||||||
@ -911,7 +911,7 @@ internal class DefaultCryptoService @Inject constructor(
|
|||||||
* Upload my user's device keys.
|
* Upload my user's device keys.
|
||||||
*/
|
*/
|
||||||
private suspend fun uploadDeviceKeys() {
|
private suspend fun uploadDeviceKeys() {
|
||||||
if (cryptoStore.getDeviceKeysUploaded()) {
|
if (cryptoStore.areDeviceKeysUploaded()) {
|
||||||
Timber.d("Keys already uploaded, nothing to do")
|
Timber.d("Keys already uploaded, nothing to do")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -475,7 +475,7 @@ internal interface IMXCryptoStore {
|
|||||||
fun getGossipingEvents(): List<Event>
|
fun getGossipingEvents(): List<Event>
|
||||||
|
|
||||||
fun setDeviceKeysUploaded(uploaded: Boolean)
|
fun setDeviceKeysUploaded(uploaded: Boolean)
|
||||||
fun getDeviceKeysUploaded(): Boolean
|
fun areDeviceKeysUploaded(): Boolean
|
||||||
fun tidyUpDataBase()
|
fun tidyUpDataBase()
|
||||||
fun logDbUsageInfo()
|
fun logDbUsageInfo()
|
||||||
}
|
}
|
||||||
|
@ -937,7 +937,7 @@ internal class RealmCryptoStore @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getDeviceKeysUploaded(): Boolean {
|
override fun areDeviceKeysUploaded(): Boolean {
|
||||||
return doWithRealm(realmConfiguration) {
|
return doWithRealm(realmConfiguration) {
|
||||||
it.where<CryptoMetadataEntity>().findFirst()?.deviceKeysSentToServer
|
it.where<CryptoMetadataEntity>().findFirst()?.deviceKeysSentToServer
|
||||||
} ?: false
|
} ?: false
|
||||||
|
Loading…
Reference in New Issue
Block a user