Browse Source

Show quotes of unnamed guests with "Guests"

Before this change the default "Guests" label only was set if the actor
display name was 'null'.

Resolves: #1730

Signed-off-by: Tim Krüger <t@timkrueger.me>
Tim Krüger 3 years ago
parent
commit
eb1512b890

+ 2 - 2
app/src/main/java/com/nextcloud/talk/adapters/messages/MagicIncomingTextMessageViewHolder.kt

@@ -211,8 +211,8 @@ class MagicIncomingTextMessageViewHolder(itemView: View, payload: Any) : Message
             } ?: run {
                 binding.messageQuote.quotedMessageImage.visibility = View.GONE
             }
-            binding.messageQuote.quotedMessageAuthor.text = parentChatMessage.actorDisplayName
-                ?: context!!.getText(R.string.nc_nick_guest)
+            binding.messageQuote.quotedMessageAuthor.text = if (parentChatMessage.actorDisplayName.isNullOrEmpty())
+                context!!.getText(R.string.nc_nick_guest) else parentChatMessage.actorDisplayName
             binding.messageQuote.quotedMessage.text = parentChatMessage.text
 
             binding.messageQuote.quotedMessageAuthor