mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-01 19:59:24 +00:00
Show subject in notifications when it is not about one-one
This commit is contained in:
parent
54c972e573
commit
5ff2e5af61
2 changed files with 10 additions and 5 deletions
|
|
@ -22,6 +22,7 @@ Rectangle {
|
|||
|
||||
property bool displayUnreadMessageCount: false
|
||||
property bool showContactAddress : true
|
||||
property bool showAuxData : false
|
||||
|
||||
// A entry from `SipAddressesModel` or an `SipAddressObserver`.
|
||||
property var entry
|
||||
|
|
@ -114,9 +115,12 @@ Rectangle {
|
|||
Layout.leftMargin: ContactStyle.spacing
|
||||
|
||||
sipAddress: (entry && item.showContactAddress
|
||||
&& (entry.isOneToOne == undefined || entry.isOneToOne) && (entry.haveEncryption == undefined || !entry.haveEncryption)
|
||||
? entry.sipAddress || entry.fullPeerAddress || entry.peerAddress || ''
|
||||
: '')
|
||||
&& (item.showAuxData
|
||||
? entry.auxDataToShow || ''
|
||||
: (entry.isOneToOne == undefined || entry.isOneToOne) && (entry.haveEncryption == undefined || !entry.haveEncryption)
|
||||
? entry.sipAddress || entry.fullPeerAddress || entry.peerAddress || ''
|
||||
: '')
|
||||
) || ''
|
||||
participants: entry && item.showContactAddress && sipAddress == '' && entry.isOneToOne && entry.participants ? entry.participants.addressesToString : ''
|
||||
username: item.username
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,13 +40,14 @@ Notification {
|
|||
property ChatRoomModel chatRoomModel : notification.timelineModel.getChatRoomModel()
|
||||
//entry: notification.fullPeerAddress? SipAddressesModel.getSipAddressObserver(notification.fullPeerAddress, notification.fullLocalAddress): notification.timelineModel.getChatRoomModel()
|
||||
property var sipObserver: SipAddressesModel.getSipAddressObserver(notification.fullPeerAddress, notification.fullLocalAddress)
|
||||
|
||||
showAuxData: !chatRoomModel.isOneToOne
|
||||
entry: ({
|
||||
sipAddress: sipObserver.peerAddress,
|
||||
contactModel: sipObserver.contact,
|
||||
isOneToOne: chatRoomModel.isOneToOne,
|
||||
haveEncryption: chatRoomModel.haveEncryption,
|
||||
securityLevel: chatRoomModel.securityLevel
|
||||
securityLevel: chatRoomModel.securityLevel,
|
||||
auxDataToShow: '- ' + chatRoomModel.subject+' -'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue