mirror of
https://gitee.com/openharmony/applications_call
synced 2025-02-11 09:45:50 +00:00
commit
2dfcc78035
@ -100,6 +100,8 @@ export default struct ContactCard {
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontColor('#FFFFFF')
|
||||
.margin({ bottom: 8 })
|
||||
.maxLines(1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
} else if (!this.isShowKeyboard) {
|
||||
Text(this.isEmergencyPhoneNumber ? this.emergency : this.callData.contactName ? this.callData.contactName : this.accountNumber)
|
||||
.fontSize(30)
|
||||
@ -108,6 +110,8 @@ export default struct ContactCard {
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontColor('#FFFFFF')
|
||||
.margin({ bottom: 8 })
|
||||
.maxLines(1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
} else if (this.isShowKeyboard && this.textInput.length != 0) {
|
||||
Scroll() {
|
||||
Text(this.textInputValue)
|
||||
@ -130,13 +134,13 @@ export default struct ContactCard {
|
||||
|
||||
Row() {
|
||||
if (!this.isShowKeyboard || this.isShowKeyboard && this.textInput.length === 0) {
|
||||
Text(this.callData.contactName ? this.accountNumber : '')
|
||||
Text((this.callData.contactName || this.isEmergencyPhoneNumber) ? this.accountNumber : '')
|
||||
.fontSize(14)
|
||||
.height(19)
|
||||
.lineHeight(16)
|
||||
.fontColor('#FFFFFF')
|
||||
.margin({ bottom: 8 })
|
||||
.visibility(this.callData.contactName && !this.isShowKeyboard ? Visibility.Visible : Visibility.None)
|
||||
.visibility((this.callData.contactName || this.isEmergencyPhoneNumber) && !this.isShowKeyboard ? Visibility.Visible : Visibility.None)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -153,8 +153,7 @@ export default struct FuncBtnGroup {
|
||||
this.mCallServiceProxy.switchCall(callId);
|
||||
break;
|
||||
case 'add':
|
||||
this.startContactAbility('page_flag_dialer')
|
||||
|
||||
this.startContact('page_flag_dialer')
|
||||
break;
|
||||
case 'video':
|
||||
break;
|
||||
@ -162,7 +161,7 @@ export default struct FuncBtnGroup {
|
||||
this.muteHandle('mute');
|
||||
break;
|
||||
case 'contact':
|
||||
this.startContactAbility("page_flag_choose_contacts")
|
||||
this.startContact("page_flag_choose_contacts")
|
||||
break;
|
||||
case 'merge':
|
||||
this.mCallServiceProxy.combineConference(callId);
|
||||
@ -172,10 +171,21 @@ export default struct FuncBtnGroup {
|
||||
}
|
||||
}
|
||||
|
||||
startContactAbility(pageFlag) {
|
||||
if (screenLock.isLocked) {
|
||||
screenLock.unlock();
|
||||
startContact(pageFlag) {
|
||||
if (screenLock.isLocked()) {
|
||||
screenLock.unlock((err, isUnlock) => {
|
||||
if (isUnlock) {
|
||||
this.startContactAbility(pageFlag)
|
||||
} else {
|
||||
LogUtils.i(TAG, "startContact screen isLocked")
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.startContactAbility(pageFlag)
|
||||
}
|
||||
}
|
||||
|
||||
startContactAbility(pageFlag) {
|
||||
globalThis.calluiAbilityContext?.startAbility({
|
||||
bundleName: 'com.ohos.contacts',
|
||||
abilityName: 'com.ohos.contacts.MainAbility',
|
||||
|
Loading…
x
Reference in New Issue
Block a user