mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 18:43:49 +00:00
Fix mentions
This commit is contained in:
parent
efbce3afa3
commit
082e806c84
@ -202,7 +202,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
|
||||
seedReminderView.visibility = View.GONE
|
||||
}
|
||||
|
||||
// Multiple device removal notification
|
||||
// Multi device removal sheet
|
||||
if (!TextSecurePreferences.getHasSeenMultiDeviceRemovalSheet(this)) {
|
||||
TextSecurePreferences.setHasSeenMultiDeviceRemovalSheet(this)
|
||||
val userPublicKey = TextSecurePreferences.getLocalNumber(this)
|
||||
@ -223,7 +223,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
|
||||
}
|
||||
}
|
||||
|
||||
// Light theme introduction
|
||||
// Light theme introduction sheet
|
||||
if (!TextSecurePreferences.hasSeenLightThemeIntroSheet(this) &&
|
||||
UiModeUtilities.isDayUiMode(this)) {
|
||||
TextSecurePreferences.setHasSeenLightThemeIntroSheet(this)
|
||||
|
@ -53,7 +53,9 @@ object MentionUtilities {
|
||||
}
|
||||
val result = SpannableString(text)
|
||||
for (mention in mentions) {
|
||||
result.setSpan(ForegroundColorSpan(context.resources.getColorWithID(R.color.accent, context.theme)), mention.first.lower, mention.first.upper, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
val isLightMode = UiModeUtilities.isDayUiMode(context)
|
||||
val colorID = if (isLightMode && isOutgoingMessage) R.color.black else R.color.accent
|
||||
result.setSpan(ForegroundColorSpan(context.resources.getColorWithID(colorID, context.theme)), mention.first.lower, mention.first.upper, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
result.setSpan(StyleSpan(Typeface.BOLD), mention.first.lower, mention.first.upper, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
}
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user