mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
code cleanup
This commit is contained in:
parent
7890e83204
commit
492ed3954a
2 changed files with 1 additions and 4 deletions
|
@ -19,7 +19,5 @@ package im.vector.matrix.android.internal.extensions
|
||||||
import io.realm.RealmObject
|
import io.realm.RealmObject
|
||||||
|
|
||||||
internal fun RealmObject.assertIsManaged() {
|
internal fun RealmObject.assertIsManaged() {
|
||||||
if (!isManaged) {
|
check(isManaged) { "${javaClass.simpleName} entity should be managed to use this function" }
|
||||||
throw IllegalStateException("${javaClass.simpleName} entity should be managed to use this function")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,6 @@ import im.vector.matrix.android.api.util.ContentUtils.extractUsefulTextFromReply
|
||||||
*/
|
*/
|
||||||
data class TextContent(
|
data class TextContent(
|
||||||
val text: String,
|
val text: String,
|
||||||
|
|
||||||
val formattedText: String? = null
|
val formattedText: String? = null
|
||||||
) {
|
) {
|
||||||
fun takeFormatted() = formattedText ?: text
|
fun takeFormatted() = formattedText ?: text
|
||||||
|
|
Loading…
Reference in a new issue