!159 crash of touchStart and id

Merge pull request !159 from zhouhongli2023/OpenHarmony-5.0.0-Release
This commit is contained in:
openharmony_ci 2024-10-15 12:27:05 +00:00 committed by Gitee
commit 2e8e01efee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 5 additions and 2 deletions

View File

@ -1490,14 +1490,14 @@ export default class ConversationController {
if (item.date.id == undefined || item.date.id == null) {
return;
}
let tempDateId = item.date.id;
let tempDateId = item.date?.id;
if (item.week == undefined || item.week == null) {
return;
}
if (item.week.id == undefined || item.week.id == null) {
return;
}
let tempWeekId = item.week.id;
let tempWeekId = item.week?.id;
if (list.length > 0) {
item.dateShow =
(tempDateId != (list[list.length-1]).date.id)

View File

@ -594,6 +594,9 @@ export default class InfoMsgController {
}
this.itemTouchedIdx = index;
let item = this.messageList[this.itemTouchedIdx];
if (item == null || item == undefined) {
return;
}
if (item.countOfUnread > 0) {
this.operateBtnW = common.int.OPERATE_UNREAD_WIDTH;
} else {