Update emojis in about status.

This commit is contained in:
mtang-signal
2024-10-07 13:38:32 -07:00
parent ca0062f46e
commit d0162d0b21
7 changed files with 3 additions and 39 deletions

View File

@@ -367,11 +367,8 @@ class Recipient(
/** The badge to feature on a recipient's avatar, if any. */
val featuredBadge: Badge? = badges.firstOrNull()
/** A string filtering out banned emojis from the about text */
val filteredAbout: String? by lazy { about?.filterNot { StringUtil.FILTERED_EMOJIS.contains(it) } }
/** A string combining the about emoji + text for displaying various places. */
val combinedAboutAndEmoji: String? by lazy { listOf(aboutEmoji, filteredAbout).filter { it.isNotNullOrBlank() }.joinToString(separator = " ").nullIfBlank() }
val combinedAboutAndEmoji: String? by lazy { listOf(aboutEmoji, about).filter { it.isNotNullOrBlank() }.joinToString(separator = " ").nullIfBlank() }
/** Whether or not we should blur the recipient's avatar when showing it in the chat list and other locations. */
val shouldBlurAvatar: Boolean

View File

@@ -96,7 +96,7 @@ class AboutSheet : ComposeBottomSheetDialogFragment() {
displayName = recipient.get().getDisplayName(requireContext()),
shortName = recipient.get().getShortDisplayName(requireContext()),
profileName = recipient.get().profileName.toString(),
about = recipient.get().filteredAbout,
about = recipient.get().about,
verified = verified,
hasAvatar = recipient.get().profileAvatarFileDetails.hasFile(),
recipientForAvatar = recipient.get(),