refactor conversation name to display name

This commit is contained in:
liamcottle 2024-09-11 21:35:43 +12:00
commit c478cb1d9c
3 changed files with 5 additions and 5 deletions

View file

@ -1098,7 +1098,7 @@ class ReticulumMeshChat:
# add to conversations
conversations.append({
"name": self.get_lxmf_conversation_name(other_user_hash),
"display_name": self.get_lxmf_conversation_name(other_user_hash),
"destination_hash": other_user_hash,
"is_unread": self.is_lxmf_conversation_unread(other_user_hash),
"failed_messages_count": self.lxmf_conversation_failed_messages_count(other_user_hash),

View file

@ -101,7 +101,7 @@ export default {
// we didn't find an existing peer, so just use an unknown name
this.onPeerClick({
name: "Unknown Peer",
display_name: "Unknown Peer",
destination_hash: destinationHash,
});

View file

@ -29,7 +29,7 @@
</div>
</div>
<div class="mr-auto">
<div class="text-gray-900" :class="{ 'font-semibold': conversation.is_unread || conversation.failed_messages_count > 0 }">{{ conversation.name }}</div>
<div class="text-gray-900" :class="{ 'font-semibold': conversation.is_unread || conversation.failed_messages_count > 0 }">{{ conversation.display_name }}</div>
<div class="text-gray-500 text-sm">{{ formatTimeAgo(conversation.updated_at) }}</div>
</div>
<div v-if="conversation.is_unread" class="my-auto ml-2 mr-2">
@ -160,9 +160,9 @@ export default {
searchedConversations() {
return this.conversations.filter((conversation) => {
const search = this.conversationsSearchTerm.toLowerCase();
const matchesName = conversation.name.toLowerCase().includes(search);
const matchesDisplayName = conversation.display_name.toLowerCase().includes(search);
const matchesDestinationHash = conversation.destination_hash.toLowerCase().includes(search);
return matchesName || matchesDestinationHash;
return matchesDisplayName || matchesDestinationHash;
});
},
peersCount() {