diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableMessageConversationExtensions.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableMessageConversationExtensions.kt index 1b3e0c212..bd03463f8 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableMessageConversationExtensions.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/ParcelableMessageConversationExtensions.kt @@ -30,7 +30,7 @@ val ParcelableMessageConversation.timestamp: Long get() = if (message_timestamp > 0) message_timestamp else local_timestamp fun ParcelableMessageConversation.getConversationName(context: Context, - manager: UserColorNameManager): Pair { + manager: UserColorNameManager, nameFirst: Boolean): Pair { if (conversation_type == ConversationType.ONE_TO_ONE) { val user = this.user ?: return Pair(context.getString(R.string.direct_messages), null) return Pair(user.name, user.screen_name) @@ -38,7 +38,7 @@ fun ParcelableMessageConversation.getConversationName(context: Context, if (conversation_name != null) { return Pair(conversation_name, null) } - return Pair(participants.joinToString(separator = ", ") { manager.getDisplayName(it, false) }, null) + return Pair(participants.joinToString(separator = ", ") { manager.getDisplayName(it, nameFirst) }, null) } fun ParcelableMessageConversation.getSummaryText(context: Context, manager: UserColorNameManager, diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageEntryViewHolder.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageEntryViewHolder.kt index dc9cbaa14..442274e92 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageEntryViewHolder.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/view/holder/message/MessageEntryViewHolder.kt @@ -55,7 +55,7 @@ class MessageEntryViewHolder(itemView: View, val adapter: MessagesEntriesAdapter content.drawEnd() } val (name, secondaryName) = conversation.getConversationName(itemView.context, - adapter.userColorNameManager) + adapter.userColorNameManager, adapter.nameFirst) this.time.time = conversation.timestamp this.name.name = name this.name.screenName = secondaryName