Skip to content

Commit

Permalink
label styling
Browse files Browse the repository at this point in the history
Signed-off-by: sowjanyakch <[email protected]>
  • Loading branch information
sowjanyakch committed Feb 10, 2025
1 parent 86b21b7 commit c76d51a
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 @@ -33,7 +33,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 c76d51a

Please sign in to comment.