mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Hide local user badge everywhere unless they have it enabled.
This commit is contained in:
@@ -370,8 +370,17 @@ class Recipient(
|
||||
}
|
||||
}
|
||||
|
||||
/** The badge to feature on a recipient's avatar, if any. */
|
||||
val featuredBadge: Badge? = badges.firstOrNull()
|
||||
/**
|
||||
* The badge to feature on a recipient's avatar, if any.
|
||||
* This value respects the local user's [SignalStore.inAppPayments.getDisplayBadgesOnProfile()] preference.
|
||||
*/
|
||||
val featuredBadge: Badge? get() {
|
||||
return if (isSelf && !SignalStore.inAppPayments.getDisplayBadgesOnProfile()) {
|
||||
null
|
||||
} else {
|
||||
badges.firstOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
/** A string combining the about emoji + text for displaying various places. */
|
||||
val combinedAboutAndEmoji: String? by lazy { listOf(aboutEmoji, about).filter { it.isNotNullOrBlank() }.joinToString(separator = " ").nullIfBlank() }
|
||||
|
||||
Reference in New Issue
Block a user