Signed-off-by: zhouhongli5@huawei.com <zhouhongli5@huawei.com>
This commit is contained in:
zhouhongli5@huawei.com 2023-09-20 15:25:20 +08:00
parent 1794d57ab6
commit 805d5fb2a0
2 changed files with 7 additions and 1 deletions

View File

@ -2271,7 +2271,9 @@ export default class ConversationController {
let telephone = common.string.EMPTY_STR;
this.textValue = common.string.EMPTY_STR;
this.setCanSendMessage(selectContacts, receiveContactValue)
if(receiveContactValue != this.strContactsName && router.getParams().isDraft == undefined) {
// @ts-ignore
let routerParams: Array<any> = this.pageInfos.getParamsByName('Conversation');
if(receiveContactValue != this.strContactsName && router.getParams[0]?.isDraft == null) {
this.isDraft = false;
}
if (hasBlur && receiveContactValue != common.string.EMPTY_STR) {

View File

@ -293,6 +293,10 @@ export default class ReceiveController {
}
let myName = this.selectContacts[0]?.contactName.trim();
let telephone = this.selectContacts[0]?.telephone
if (telephone === undefined || telephone === null) {
Hilog.i(TAG, "setShowContactName fail");
return '';
}
if (!this.isPhoneNumber(telephone)) {
myName = telephone.replace(new RegExp(/e|-|#|\*|\./, "g"), common.string.EMPTY_STR);
} else {