mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-23 16:23:55 +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
|
// Daemon reconnection
|
||||||
property string reconnectDaemon: qsTr("Trying to reconnect to the Jami daemon (dring)…")
|
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.")
|
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: {
|
case Role::ContactType: {
|
||||||
return QVariant(static_cast<int>(contact.profileInfo.type));
|
return QVariant(static_cast<int>(contact.profileInfo.type));
|
||||||
}
|
}
|
||||||
|
case Role::IsSwarm: {
|
||||||
|
return QVariant(item.mode != lrc::api::conversation::Mode::NON_SWARM);
|
||||||
|
}
|
||||||
case Role::IsBanned: {
|
case Role::IsBanned: {
|
||||||
return QVariant(contact.isBanned);
|
return QVariant(contact.isBanned);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
X(LastInteractionDate) \
|
X(LastInteractionDate) \
|
||||||
X(LastInteraction) \
|
X(LastInteraction) \
|
||||||
X(ContactType) \
|
X(ContactType) \
|
||||||
|
X(IsSwarm) \
|
||||||
X(IsBanned) \
|
X(IsBanned) \
|
||||||
X(UID) \
|
X(UID) \
|
||||||
X(InCall) \
|
X(InCall) \
|
||||||
|
|
|
@ -424,6 +424,7 @@ ConversationsAdapter::getConvInfoMap(const QString& convId)
|
||||||
{"bestId", contactModel->bestIdForContact(peerUri)},
|
{"bestId", contactModel->bestIdForContact(peerUri)},
|
||||||
{"bestName", contactModel->bestNameForContact(peerUri)},
|
{"bestName", contactModel->bestNameForContact(peerUri)},
|
||||||
{"uri", peerUri},
|
{"uri", peerUri},
|
||||||
|
{"isSwarm", convInfo.mode != lrc::api::conversation::Mode::NON_SWARM},
|
||||||
{"contactType", static_cast<int>(contact.profileInfo.type)},
|
{"contactType", static_cast<int>(contact.profileInfo.type)},
|
||||||
{"isAudioOnly", isAudioOnly},
|
{"isAudioOnly", isAudioOnly},
|
||||||
{"callState", static_cast<int>(callState)},
|
{"callState", static_cast<int>(callState)},
|
||||||
|
|
|
@ -134,6 +134,7 @@ ListView {
|
||||||
"displayName": model.dataForRow(row, ConversationList.BestName),
|
"displayName": model.dataForRow(row, ConversationList.BestName),
|
||||||
"uri": model.dataForRow(row, ConversationList.URI),
|
"uri": model.dataForRow(row, ConversationList.URI),
|
||||||
"contactType": model.dataForRow(row, ConversationList.ContactType),
|
"contactType": model.dataForRow(row, ConversationList.ContactType),
|
||||||
|
"isSwarm": model.dataForRow(row, ConversationList.IsSwarm),
|
||||||
}
|
}
|
||||||
|
|
||||||
responsibleAccountId = LRCInstance.currentAccountId
|
responsibleAccountId = LRCInstance.currentAccountId
|
||||||
|
@ -145,6 +146,7 @@ ListView {
|
||||||
userProfile.registeredNameText = item.displayId
|
userProfile.registeredNameText = item.displayId
|
||||||
userProfile.idText = item.uri
|
userProfile.idText = item.uri
|
||||||
userProfile.contactImageUid = item.convId
|
userProfile.contactImageUid = item.convId
|
||||||
|
userProfile.isSwarm = item.isSwarm
|
||||||
|
|
||||||
openMenu()
|
openMenu()
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ BaseDialog {
|
||||||
property string aliasText: ""
|
property string aliasText: ""
|
||||||
property string registeredNameText: ""
|
property string registeredNameText: ""
|
||||||
property string idText: ""
|
property string idText: ""
|
||||||
|
property bool isSwarm: false
|
||||||
|
|
||||||
property int preferredImgSize: 80
|
property int preferredImgSize: 80
|
||||||
|
|
||||||
|
@ -205,6 +206,20 @@ BaseDialog {
|
||||||
mipmap: true
|
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 {
|
MaterialButton {
|
||||||
id: btnClose
|
id: btnClose
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue