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