Timeline: avoid notifying when decryption error is same as previous

This commit is contained in:
ganfra 2021-12-02 20:42:54 +01:00
parent 03961fe933
commit 76eddef840

View file

@ -40,8 +40,6 @@ internal open class EventEntity(@Index var eventId: String = "",
var unsignedData: String? = null,
var redacts: String? = null,
var decryptionResultJson: String? = null,
var decryptionErrorCode: String? = null,
var decryptionErrorReason: String? = null,
var ageLocalTs: Long? = null
) : RealmObject() {
@ -55,6 +53,16 @@ internal open class EventEntity(@Index var eventId: String = "",
sendStateStr = value.name
}
var decryptionErrorCode: String? = null
set(value) {
if (value != field) field = value
}
var decryptionErrorReason: String? = null
set(value) {
if (value != field) field = value
}
companion object
fun setDecryptionResult(result: MXEventDecryptionResult, clearEvent: JsonDict? = null) {