Skip to content

Commit

Permalink
label styling
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
  • Loading branch information
sowjanyakch committed Feb 14, 2025
1 parent 892624e commit 022785c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ChatUtils {
resultMessage?.replace("{$key}", "@" + individualHashMap["name"])
} else if (type == "geo-location") {
individualHashMap["name"]
} else if (individualHashMap.containsKey("link") == true) {
} else if (individualHashMap.containsKey("link")) {
if (type == "file") {
resultMessage?.replace("{$key}", individualHashMap["name"].toString())
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ package com.nextcloud.talk.utils.message

import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.graphics.Typeface
import android.net.Uri
import android.text.SpannableString
import android.text.SpannableStringBuilder
import android.text.Spanned
import android.text.style.ForegroundColorSpan
import android.text.style.StyleSpan
import android.util.Log
import android.view.View
import com.nextcloud.talk.R
Expand Down Expand Up @@ -152,21 +152,19 @@ class MessageUtils(val context: Context) {
val end = start + placeholder.length
spannable.replace(start, end, replacementText)
spannable.setSpan(
ForegroundColorSpan(Color.BLUE),
StyleSpan(Typeface.BOLD),
start,
start + replacementText!!
.length,
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
)

start = spannable.indexOf(placeholder, start + replacementText.length)
}
messageStringInternal = spannable
}
}
}
}

return messageStringInternal
}

Expand Down

0 comments on commit 022785c

Please sign in to comment.