mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-14 04:25:22 +02:00
userprofile: add isSwarm to profile
Change-Id: I6504c20cba5b51d54d0e9947c2303108f2a2161d
This commit is contained in:
parent
3d71bfa8ae
commit
11119e51f6
6 changed files with 27 additions and 0 deletions
|
@ -480,4 +480,9 @@ Item {
|
|||
// Daemon reconnection
|
||||
property string reconnectDaemon: qsTr("Trying to reconnect to the Jami daemon (dring)…")
|
||||
property string reconnectionFailed: qsTr("Could not re-connect to the Jami daemon (dring).\nJami will now quit.")
|
||||
|
||||
// Is Swarm
|
||||
property string isSwarm: qsTr("Is swarm:")
|
||||
property string trueStr: qsTr("True")
|
||||
property string falseStr: qsTr("False")
|
||||
}
|
||||
|
|
|
@ -104,6 +104,9 @@ ConversationListModelBase::dataForItem(item_t item, int role) const
|
|||
case Role::ContactType: {
|
||||
return QVariant(static_cast<int>(contact.profileInfo.type));
|
||||
}
|
||||
case Role::IsSwarm: {
|
||||
return QVariant(item.mode != lrc::api::conversation::Mode::NON_SWARM);
|
||||
}
|
||||
case Role::IsBanned: {
|
||||
return QVariant(contact.isBanned);
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
X(LastInteractionDate) \
|
||||
X(LastInteraction) \
|
||||
X(ContactType) \
|
||||
X(IsSwarm) \
|
||||
X(IsBanned) \
|
||||
X(UID) \
|
||||
X(InCall) \
|
||||
|
|
|
@ -424,6 +424,7 @@ ConversationsAdapter::getConvInfoMap(const QString& convId)
|
|||
{"bestId", contactModel->bestIdForContact(peerUri)},
|
||||
{"bestName", contactModel->bestNameForContact(peerUri)},
|
||||
{"uri", peerUri},
|
||||
{"isSwarm", convInfo.mode != lrc::api::conversation::Mode::NON_SWARM},
|
||||
{"contactType", static_cast<int>(contact.profileInfo.type)},
|
||||
{"isAudioOnly", isAudioOnly},
|
||||
{"callState", static_cast<int>(callState)},
|
||||
|
|
|
@ -134,6 +134,7 @@ ListView {
|
|||
"displayName": model.dataForRow(row, ConversationList.BestName),
|
||||
"uri": model.dataForRow(row, ConversationList.URI),
|
||||
"contactType": model.dataForRow(row, ConversationList.ContactType),
|
||||
"isSwarm": model.dataForRow(row, ConversationList.IsSwarm),
|
||||
}
|
||||
|
||||
responsibleAccountId = LRCInstance.currentAccountId
|
||||
|
@ -145,6 +146,7 @@ ListView {
|
|||
userProfile.registeredNameText = item.displayId
|
||||
userProfile.idText = item.uri
|
||||
userProfile.contactImageUid = item.convId
|
||||
userProfile.isSwarm = item.isSwarm
|
||||
|
||||
openMenu()
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ BaseDialog {
|
|||
property string aliasText: ""
|
||||
property string registeredNameText: ""
|
||||
property string idText: ""
|
||||
property bool isSwarm: false
|
||||
|
||||
property int preferredImgSize: 80
|
||||
|
||||
|
@ -205,6 +206,20 @@ BaseDialog {
|
|||
mipmap: true
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
font.pointSize: JamiTheme.textFontSize
|
||||
text: JamiStrings.isSwarm
|
||||
color: JamiTheme.faddedFontColor
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
font.pointSize: JamiTheme.textFontSize
|
||||
text: isSwarm? JamiStrings.trueStr : JamiStrings.falseStr
|
||||
color: JamiTheme.faddedFontColor
|
||||
}
|
||||
|
||||
MaterialButton {
|
||||
id: btnClose
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue