Commit 5d68045a authored by Leonardo Aramaki's avatar Leonardo Aramaki

Add systemMessage property

parent 93b2c2ab
...@@ -42,12 +42,13 @@ data class MessageViewModel(val context: Context, ...@@ -42,12 +42,13 @@ data class MessageViewModel(val context: Context,
var attachmentUrl: String? = null var attachmentUrl: String? = null
var attachmentTitle: CharSequence? = null var attachmentTitle: CharSequence? = null
var attachmentType: AttachmentType? = null var attachmentType: AttachmentType? = null
var systemMessage: Boolean = false
init { init {
sender = getSenderName() sender = getSenderName()
time = getTime() time = getTime()
val baseUrl = settings?.get(SITE_URL) val baseUrl = settings.get(SITE_URL)
message.urls?.let { message.urls?.let {
if (it.isEmpty()) return@let if (it.isEmpty()) return@let
for (url in it) { for (url in it) {
...@@ -138,6 +139,7 @@ data class MessageViewModel(val context: Context, ...@@ -138,6 +139,7 @@ data class MessageViewModel(val context: Context,
} }
private fun getSystemMessage(content: String): CharSequence { private fun getSystemMessage(content: String): CharSequence {
systemMessage = true
val spannableMsg = SpannableString(content) val spannableMsg = SpannableString(content)
spannableMsg.setSpan(StyleSpan(Typeface.ITALIC), 0, spannableMsg.length, spannableMsg.setSpan(StyleSpan(Typeface.ITALIC), 0, spannableMsg.length,
0) 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment