From 9368e38b98f2c79372dc4b375f026f6449ce6cad Mon Sep 17 00:00:00 2001 From: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> Date: Fri, 14 Nov 2025 07:59:41 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> --- .../src/main/ets/pages/ConversationDetail.ets | 64 ++++++------------- .../home/src/main/ets/views/MessageBubble.ets | 2 +- 2 files changed, 22 insertions(+), 44 deletions(-) diff --git a/features/home/src/main/ets/pages/ConversationDetail.ets b/features/home/src/main/ets/pages/ConversationDetail.ets index eda9ee3..1ee1d52 100755 --- a/features/home/src/main/ets/pages/ConversationDetail.ets +++ b/features/home/src/main/ets/pages/ConversationDetail.ets @@ -24,56 +24,33 @@ import { deviceInfo } from '@kit.BasicServicesKit'; @Component export struct ConversationDetail { @StorageProp('currentBreakpoint') currentBreakpoint: string = 'sm'; - @Prop currentConversationUserName: string; + @Prop currentConversationUserName: Resource; @Prop currentFeatureIndex: number; - @Consume('pageInfo') pageInfo: NavPathStack; build() { NavDestination() { Flex({ direction: FlexDirection.Column }) { ConversationDetailTopSearch({ currentConversationUserName: $currentConversationUserName, }) .height(Adaptive.ContactItemHeight(this.currentBreakpoint)) - if (this.currentConversationUserName.length === 3) { - ConversationDetailItem({ - receivedName: $currentConversationUserName, - isReceived: true, - content: $r('app.string.FF_take_tea'), - isAppletMsg: true, - currentFeatureIndex: $currentFeatureIndex - }) - ConversationDetailItem({ - receivedName: $currentConversationUserName, - isReceived: true, - content: $r('app.string.Speed'), - currentFeatureIndex: $currentFeatureIndex - }) - ConversationDetailItem({ - receivedName: $currentConversationUserName, - isReceived: false, - content: $r('app.string.happy_thing'), - currentFeatureIndex: $currentFeatureIndex - }) - } else { - ConversationDetailItem({ - receivedName: $currentConversationUserName, - isReceived: true, - content: $r('app.string.2023_preach'), - isDocumentMsg: true, - currentFeatureIndex: $currentFeatureIndex - }) - ConversationDetailItem({ - receivedName: $currentConversationUserName, - isReceived: true, - content: $r('app.string.confirm_meeting'), - currentFeatureIndex: $currentFeatureIndex - }) - ConversationDetailItem({ - receivedName: $currentConversationUserName, - isReceived: false, - content: $r('app.string.okay'), - currentFeatureIndex: $currentFeatureIndex - }) - } + ConversationDetailItem({ + receivedName: $currentConversationUserName, + isReceived: true, + content: $r('app.string.FF_take_tea'), + isAppletMsg: true, + currentFeatureIndex: $currentFeatureIndex + }) + ConversationDetailItem({ + receivedName: $currentConversationUserName, + isReceived: true, + content: $r('app.string.Speed'), + currentFeatureIndex: $currentFeatureIndex + }) + ConversationDetailItem({ + receivedName: $currentConversationUserName, + isReceived: false, + content: $r('app.string.happy_thing'), + currentFeatureIndex: $currentFeatureIndex + }) Blank() ConversationDetailBottom() } @@ -87,4 +64,5 @@ export struct ConversationDetail { .hideTitleBar(true) } } + // [End conversation_detail] \ No newline at end of file diff --git a/features/home/src/main/ets/views/MessageBubble.ets b/features/home/src/main/ets/views/MessageBubble.ets index 65f6aa7..dacc95b 100755 --- a/features/home/src/main/ets/views/MessageBubble.ets +++ b/features/home/src/main/ets/views/MessageBubble.ets @@ -33,7 +33,7 @@ export struct MessageBubble { Column() { Flex({ justifyContent: this.isReceived ? FlexAlign.Start : FlexAlign.End, direction: FlexDirection.Row }) { if (this.isReceived) { - Image(ConversationListData.find((item) => item.name === this.receivedName)?.icon || this.avatar1) + Image(ConversationListData.find((item) => item.name.id === this.receivedName.id)?.icon || this.avatar1) .width($r('app.float.avatar_image_size')) .height($r('app.float.avatar_image_size')) .flexShrink(BaseConstants.FLEX_SHRINK_ZERO) -- Gitee From a397216f920ed57cb43b9ecef06625edb7fd14e9 Mon Sep 17 00:00:00 2001 From: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> Date: Fri, 14 Nov 2025 08:05:56 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ZhangQ <12903047+zq-kexin@user.noreply.gitee.com> --- features/home/src/main/ets/pages/ConversationDetail.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/home/src/main/ets/pages/ConversationDetail.ets b/features/home/src/main/ets/pages/ConversationDetail.ets index 1ee1d52..2b22103 100755 --- a/features/home/src/main/ets/pages/ConversationDetail.ets +++ b/features/home/src/main/ets/pages/ConversationDetail.ets @@ -24,7 +24,7 @@ import { deviceInfo } from '@kit.BasicServicesKit'; @Component export struct ConversationDetail { @StorageProp('currentBreakpoint') currentBreakpoint: string = 'sm'; - @Prop currentConversationUserName: Resource; + @Prop currentConversationUserName: string; @Prop currentFeatureIndex: number; build() { -- Gitee