fix #LINQT-1519 back button register page

fix crash

close #LINQT-919 red circle token unverified call

fix paused status

fix #LINQT-1561 troncated texts
This commit is contained in:
Gaelle Braud 2025-01-17 16:37:25 +01:00 committed by gaelle
parent 2e93b769d0
commit 946adfb020
10 changed files with 30 additions and 31 deletions

View file

@ -144,6 +144,7 @@ CallCore::CallCore(const std::shared_ptr<linphone::Call> &call) : QObject(nullpt
mRemoteTokens = mCallModel->getRemoteAtuhenticationTokens();
mEncryption = LinphoneEnums::fromLinphone(call->getParams()->getMediaEncryption());
auto tokenVerified = call->getAuthenticationTokenVerified();
mIsMismatch = call->getZrtpCacheMismatchFlag();
mIsSecured = (mEncryption == LinphoneEnums::MediaEncryption::Zrtp && tokenVerified) ||
mEncryption == LinphoneEnums::MediaEncryption::Srtp ||
mEncryption == LinphoneEnums::MediaEncryption::Dtls;
@ -236,9 +237,9 @@ void CallCore::setSelf(QSharedPointer<CallCore> me) {
});
mCallModelConnection->makeConnectToModel(&CallModel::authenticationTokenVerified,
[this](const std::shared_ptr<linphone::Call> &call, bool verified) {
auto isMismatch = mCallModel->getZrtpCaseMismatch();
mCallModelConnection->invokeToCore([this, verified, isMismatch]() {
mCallModelConnection->invokeToCore([this, verified]() {
setTokenVerified(verified);
setIsMismatch(!verified);
emit tokenVerified();
});
});

View file

@ -525,18 +525,13 @@ void ConferenceInfoCore::writeFromModel(const std::shared_ptr<ConferenceInfoMode
mOrganizerAddress = model->getOrganizerAddress();
mDescription = model->getDescription();
mParticipants.clear();
QStringList participantAddresses;
for (auto &infos : model->getParticipantInfos()) {
participantAddresses.append(Utils::coreStringToAppString(infos->getAddress()->asStringUriOnly()));
auto address = Utils::coreStringToAppString(infos->getAddress()->asStringUriOnly());
QVariantMap participant;
participant["address"] = address;
participant["role"] = (int)LinphoneEnums::ParticipantRole::Listener;
mParticipants.append(participant);
}
mConfInfoModelConnection->invokeToModel([this, participantAddresses]() { // Copy values to avoid concurrency
for (auto &address : participantAddresses) {
QVariantMap participant;
participant["address"] = address;
participant["role"] = (int)LinphoneEnums::ParticipantRole::Listener;
mParticipants.append(participant);
}
});
}
void ConferenceInfoCore::writeIntoModel(std::shared_ptr<ConferenceInfoModel> model) {

View file

@ -15,6 +15,7 @@ Button {
style: ButtonStyle.hoveredBackground
contentItem: RowLayout {
spacing: 5 * DefaultStyle.dp
EffectImage {
imageSource: mainItem.icon.source
imageWidth: mainItem.icon.width
@ -27,9 +28,9 @@ Button {
Layout.preferredWidth: mainItem.icon.width
Layout.preferredHeight: mainItem.icon.height
}
Text{
horizontalAlignment: mainItem.textHAlignment
verticalAlignment: Text.AlignLeft
Text {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
Layout.preferredWidth: textMetrics.advanceWidth
wrapMode: Text.WrapAnywhere
text: mainItem.text
@ -53,6 +54,6 @@ Button {
font.bold: true
}
}
Item{Layout.fillWidth: true}
Item {Layout.fillWidth: true}
}
}

View file

@ -46,6 +46,7 @@ Item {
property var address: participantDevice && participantDevice.core.address
videoEnabled: (participantDevice && participantDevice.core.videoEnabled) || (!participantDevice && call && call.core.remoteVideoEnabled)
qmlName: 'AS'
securityBreach: !mainItem.conference && mainItem.call?.core.isMismatch
displayPresence: false
Binding {
target: mainItem

View file

@ -73,6 +73,7 @@ ListView {
}
Button {
id: pausingButton
enabled: !(modelData.core.state === LinphoneEnums.CallState.PausedByRemote)
Layout.preferredWidth: 28 * DefaultStyle.dp
Layout.preferredHeight: 28 * DefaultStyle.dp
Layout.alignment: Qt.AlignVCenter
@ -80,13 +81,12 @@ ListView {
rightPadding: 5 * DefaultStyle.dp
topPadding: 5 * DefaultStyle.dp
bottomPadding: 5 * DefaultStyle.dp
property bool isPaused: modelData.core.state === LinphoneEnums.CallState.Paused
|| modelData.core.state === LinphoneEnums.CallState.PausedByRemote
color: isPaused ? DefaultStyle.success_500main : DefaultStyle.grey_500
property bool pausedByUser: modelData.core.state === LinphoneEnums.CallState.Paused
color: pausedByUser ? DefaultStyle.success_500main : DefaultStyle.grey_500
contentImageColor: DefaultStyle.grey_0
KeyNavigation.right: endCallButton
KeyNavigation.left: endCallButton
icon.source: isPaused ? AppIcons.play : AppIcons.pause
icon.source: pausedByUser ? AppIcons.play : AppIcons.pause
icon.width: 18 * DefaultStyle.dp
icon.height: 18 * DefaultStyle.dp
onClicked: modelData.core.lSetPaused(!modelData.core.paused)

View file

@ -16,6 +16,7 @@ Item {
height: 300
width: 200
property bool previewEnabled
property bool securityBreach
property CallGui call: null
property ConferenceGui conference: call && call.core.conference || null
property var callState: call && call.core.state || undefined
@ -108,6 +109,7 @@ Item {
account: mainItem.account
call: !mainItem.previewEnabled ? mainItem.call : null
displayNameVal: mainItem.displayName
securityBreach: mainItem.securityBreach ? mainItem.securityBreach : securityLevel === LinphoneEnums.SecurityLevel.Unsafe
}
ColumnLayout{
id: joiningView

View file

@ -17,13 +17,11 @@ LoginLayout {
signal connectionSucceed()
titleContent: [
Button {
BigButton {
enabled: mainItem.showBackButton
opacity: mainItem.showBackButton ? 1.0 : 0
Layout.leftMargin: 79 * DefaultStyle.dp
icon.source: AppIcons.leftArrow
icon.width: 24 * DefaultStyle.dp
icon.height: 24 * DefaultStyle.dp
style: ButtonStyle.noBackground
onClicked: {
console.debug("[LoginLayout] User: return")

View file

@ -33,7 +33,15 @@ LoginLayout {
titleContent: [
RowLayout {
spacing: 21 * DefaultStyle.dp
Layout.leftMargin: 119 * DefaultStyle.dp
Layout.leftMargin: 79 * DefaultStyle.dp
BigButton {
style: ButtonStyle.noBackground
icon.source: AppIcons.leftArrow
onClicked: {
console.debug("[RegisterPage] User: return")
returnToLogin()
}
}
EffectImage {
fillMode: Image.PreserveAspectFit
imageSource: AppIcons.profile

View file

@ -109,7 +109,6 @@ RowLayout {
Layout.fillWidth: true
}
MediumButton {
Layout.preferredHeight: 47 * DefaultStyle.dp
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
text: qsTr("Ajouter")
style: ButtonStyle.main

View file

@ -304,15 +304,12 @@ AbstractMainPage {
delegate: FocusScope {
width:historyListView.width
height: 56 * DefaultStyle.dp
anchors.topMargin: 5 * DefaultStyle.dp
anchors.bottomMargin: 5 * DefaultStyle.dp
visible: !!modelData
RowLayout {
z: 1
anchors.fill: parent
anchors.leftMargin: 10 * DefaultStyle.dp
anchors.rightMargin: 15 * DefaultStyle.dp
spacing: 10 * DefaultStyle.dp
Avatar {
id: historyAvatar
@ -383,11 +380,8 @@ AbstractMainPage {
}
}
BigButton {
padding: 0
style: ButtonStyle.noBackground
icon.source: AppIcons.phone
// Layout.preferredWidth: 24 * DefaultStyle.dp
// Layout.preferredHeight: 24 * DefaultStyle.dp
focus: true
activeFocusOnTab: false
onClicked: {