1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-07-19 15:05:40 +02:00

swarm: remove members limit for swarms

Change-Id: I1b9a46fd524b2af4b795986491f5d2fd882437d5
This commit is contained in:
Sébastien Blin 2022-11-17 10:57:30 -05:00
parent ae1cde4dc1
commit fb0d2434d0
4 changed files with 2 additions and 31 deletions

View file

@ -852,8 +852,6 @@ Item {
property string none: qsTr("None")
// 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 goToConversation: qsTr("Go to conversation")
property string promoteAdministrator: qsTr("Promote to administrator")

View file

@ -154,12 +154,9 @@ ContactAdapter::contactSelected(int index)
switch (listModeltype_) {
case SmartListModel::Type::ADDCONVMEMBER: {
auto members = convModel->peersForConversation(lrcInstance_->get_selectedConvUid());
auto cntMembers = members.size();
const auto uris = contactIndex.data(Role::Uris).toStringList();
for (const auto& uri : uris) {
// TODO remove < 9
if (!members.contains(uri) && cntMembers < 9) {
cntMembers++;
if (!members.contains(uri)) {
convModel->addConversationMember(lrcInstance_->get_selectedConvUid(), uri);
}
}

View file

@ -207,7 +207,7 @@ Rectangle {
normalColor: JamiTheme.chatviewBgColor
imageColor: JamiTheme.chatviewButtonColor
visible: interactionButtonsVisibility && CurrentConversationMembers.count < 8 && addMemberVisibility
visible: interactionButtonsVisibility && addMemberVisibility
onClicked: addToConversationClicked()
}

View file

@ -131,11 +131,6 @@ SidePanelBase {
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)
root.highlighted = newH
root.highlightedMembers = newHm
@ -397,25 +392,6 @@ SidePanelBase {
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 {
id: swarmCurrentConversationList