code cleanup

This commit is contained in:
Benoit Marty 2019-10-22 10:20:51 +02:00
parent 7890e83204
commit 492ed3954a
2 changed files with 1 additions and 4 deletions

View file

@ -19,7 +19,5 @@ package im.vector.matrix.android.internal.extensions
import io.realm.RealmObject
internal fun RealmObject.assertIsManaged() {
if (!isManaged) {
throw IllegalStateException("${javaClass.simpleName} entity should be managed to use this function")
}
check(isManaged) { "${javaClass.simpleName} entity should be managed to use this function" }
}

View file

@ -26,7 +26,6 @@ import im.vector.matrix.android.api.util.ContentUtils.extractUsefulTextFromReply
*/
data class TextContent(
val text: String,
val formattedText: String? = null
) {
fun takeFormatted() = formattedText ?: text