mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-20 15:35:25 +02:00
swarm: remove members limit for swarms
Change-Id: I1b9a46fd524b2af4b795986491f5d2fd882437d5
This commit is contained in:
parent
ae1cde4dc1
commit
fb0d2434d0
4 changed files with 2 additions and 31 deletions
|
@ -852,8 +852,6 @@ Item {
|
||||||
property string none: qsTr("None")
|
property string none: qsTr("None")
|
||||||
|
|
||||||
// NewSwarmPage
|
// NewSwarmPage
|
||||||
property string youCanAdd7: qsTr("You can add 7 people in the swarm")
|
|
||||||
property string youCanAddMore: qsTr("You can add %1 more people in the swarm")
|
|
||||||
property string createTheSwarm: qsTr("Create the swarm")
|
property string createTheSwarm: qsTr("Create the swarm")
|
||||||
property string goToConversation: qsTr("Go to conversation")
|
property string goToConversation: qsTr("Go to conversation")
|
||||||
property string promoteAdministrator: qsTr("Promote to administrator")
|
property string promoteAdministrator: qsTr("Promote to administrator")
|
||||||
|
|
|
@ -154,12 +154,9 @@ ContactAdapter::contactSelected(int index)
|
||||||
switch (listModeltype_) {
|
switch (listModeltype_) {
|
||||||
case SmartListModel::Type::ADDCONVMEMBER: {
|
case SmartListModel::Type::ADDCONVMEMBER: {
|
||||||
auto members = convModel->peersForConversation(lrcInstance_->get_selectedConvUid());
|
auto members = convModel->peersForConversation(lrcInstance_->get_selectedConvUid());
|
||||||
auto cntMembers = members.size();
|
|
||||||
const auto uris = contactIndex.data(Role::Uris).toStringList();
|
const auto uris = contactIndex.data(Role::Uris).toStringList();
|
||||||
for (const auto& uri : uris) {
|
for (const auto& uri : uris) {
|
||||||
// TODO remove < 9
|
if (!members.contains(uri)) {
|
||||||
if (!members.contains(uri) && cntMembers < 9) {
|
|
||||||
cntMembers++;
|
|
||||||
convModel->addConversationMember(lrcInstance_->get_selectedConvUid(), uri);
|
convModel->addConversationMember(lrcInstance_->get_selectedConvUid(), uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ Rectangle {
|
||||||
normalColor: JamiTheme.chatviewBgColor
|
normalColor: JamiTheme.chatviewBgColor
|
||||||
imageColor: JamiTheme.chatviewButtonColor
|
imageColor: JamiTheme.chatviewButtonColor
|
||||||
|
|
||||||
visible: interactionButtonsVisibility && CurrentConversationMembers.count < 8 && addMemberVisibility
|
visible: interactionButtonsVisibility && addMemberVisibility
|
||||||
|
|
||||||
onClicked: addToConversationClicked()
|
onClicked: addToConversationClicked()
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,11 +131,6 @@ SidePanelBase {
|
||||||
newHm = Array.from(newHm).filter(r => r.convId !== convId)
|
newHm = Array.from(newHm).filter(r => r.convId !== convId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We can't have more than 8 participants yet. (7 + self)
|
|
||||||
if (newHm.length > 7) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
newH.push(convId)
|
newH.push(convId)
|
||||||
root.highlighted = newH
|
root.highlighted = newH
|
||||||
root.highlightedMembers = newHm
|
root.highlightedMembers = newHm
|
||||||
|
@ -397,25 +392,6 @@ SidePanelBase {
|
||||||
|
|
||||||
spacing: 4
|
spacing: 4
|
||||||
|
|
||||||
Text {
|
|
||||||
font.bold: true
|
|
||||||
font.pointSize: JamiTheme.contactEventPointSize
|
|
||||||
|
|
||||||
Layout.margins: 16
|
|
||||||
Layout.maximumHeight: 24
|
|
||||||
Layout.alignment: Qt.AlignTop
|
|
||||||
Layout.fillWidth: true
|
|
||||||
|
|
||||||
wrapMode: Text.Wrap
|
|
||||||
|
|
||||||
text: {
|
|
||||||
if (highlightedMembers.length === 0)
|
|
||||||
return JamiStrings.youCanAdd7
|
|
||||||
return JamiStrings.youCanAddMore.arg(7 - Math.min(highlightedMembers.length, 7))
|
|
||||||
}
|
|
||||||
color: JamiTheme.textColor
|
|
||||||
}
|
|
||||||
|
|
||||||
JamiListView {
|
JamiListView {
|
||||||
id: swarmCurrentConversationList
|
id: swarmCurrentConversationList
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue