Improve getClearContent() method: it should not fallback to the encrypted content when the content is not decrypted.
This commit is contained in:
parent
cc355a8e14
commit
a1140fd8fa
|
@ -219,10 +219,16 @@ data class Event(
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the event content
|
* @return the event content.
|
||||||
|
* If the content is encrypted, it will return the decrypted content, or null if the content is not
|
||||||
|
* decrypted.
|
||||||
*/
|
*/
|
||||||
fun getClearContent(): Content? {
|
fun getClearContent(): Content? {
|
||||||
return getDecryptedContent() ?: content
|
return if (isEncrypted()) {
|
||||||
|
getDecryptedContent()
|
||||||
|
} else {
|
||||||
|
content
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue