refactor: simplify comparison

This commit is contained in:
0x330a 2024-03-27 15:23:42 +11:00
parent e595cfb504
commit ef157f9991
No known key found for this signature in database
GPG Key ID: 1778496142B5D384

View File

@ -72,7 +72,7 @@ class QuoteView @JvmOverloads constructor(context: Context, attrs: AttributeSet?
// Author
val author = contactDb.getContactWithSessionID(authorPublicKey)
val localNumber = TextSecurePreferences.getLocalNumber(context)
val quoteIsLocalUser = localNumber != null && localNumber != null && authorPublicKey == localNumber
val quoteIsLocalUser = localNumber != null && authorPublicKey == localNumber
val authorDisplayName =
if (quoteIsLocalUser) context.getString(R.string.QuoteView_you)