From d487931038976230609fac4e01277d4eea0163e1 Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 27 Nov 2023 18:00:49 -0800 Subject: [PATCH] display name is being properly set now. --- .../ThreadPreview/ThreadPreview.vue | 21 +++-- .../WebTextingContainer.vue | 79 +++++++++++-------- .../components/conversation/Conversation.vue | 50 +++++++----- frontend/components/message/Message.vue | 2 +- frontend/lib/backfill.ts | 8 +- frontend/main.ts | 4 +- frontend/routes/index.ts | 2 +- threadlist.php | 8 ++ 8 files changed, 107 insertions(+), 67 deletions(-) diff --git a/frontend/components/ThreadPreview/ThreadPreview.vue b/frontend/components/ThreadPreview/ThreadPreview.vue index ba8775d..f4df720 100644 --- a/frontend/components/ThreadPreview/ThreadPreview.vue +++ b/frontend/components/ThreadPreview/ThreadPreview.vue @@ -1,6 +1,6 @@ @@ -70,24 +87,24 @@ The blank space should notify the user that they can select a thread to display -
- - - - - - - -
-
+
+ + + + + + + +
+ \ No newline at end of file diff --git a/frontend/components/conversation/Conversation.vue b/frontend/components/conversation/Conversation.vue index 4803f69..d40812c 100644 --- a/frontend/components/conversation/Conversation.vue +++ b/frontend/components/conversation/Conversation.vue @@ -106,7 +106,10 @@ export default { }, groupMembers: { type: Array, - } + }, + selectedConvo: { + type:Boolean, + }, }, components: { Message, SendBox }, async setup(props) { @@ -128,22 +131,22 @@ export default { data() { let title = ""; - if (this.displayName) { - title = this.displayName; - } else if (this.groupMembers) { - title = this.groupMembers.join(", "); - } - - if (this.remoteNumber) { - if (title.length > 0) { - title += " (" + this.remoteNumber + ")"; - } else { - title += this.remoteNumber; - } - } - else if(this.groupUUID){ - title+= this.groupUUID; - } + // if (this.displayName) { + // title = this.displayName; + // } else if (this.groupMembers) { + // title = this.groupMembers.join(", "); + // } + + // if (this.remoteNumber) { + // if (title.length > 0) { + // title += " (" + this.remoteNumber + ")"; + // } else { + // title += this.remoteNumber; + // } + // } + // else if(this.groupUUID){ + // title+= this.groupUUID; + // } let conversationKey = this.remoteNumber ? this.remoteNumber : this.groupUUID; return { bottomVisible: true, @@ -207,6 +210,11 @@ export default { console.log('preventing future backfilling attempts, this conversation has been fully backfilled'); this.backfillAvailable = false; }) + + emitter.on('thread-changed', (newDisplayName:String) => { + console.log(`thread changed new display name is ${newDisplayName}`); + this.title = newDisplayName; + }) //console.log(this.state.messages); //console.log("Conversation.vue mounted with props:\nremoteNumber:", this.remoteNumber, "\ngroupUUID:", this.groupUUID, "\ndisplayName:", this.displayName, "\nownNumber:", this.ownNumber); }, @@ -223,7 +231,7 @@ export default { watch: { //this fires when we set remoteNumber to null or w/e remoteNumber: async function (rN) { - this.title = rN; + //this.title = rN; this.messages = []; this.backfillAvailable = true; @@ -341,7 +349,7 @@ export default {