chore(@dekstop/chat): issue with adding members to already created group and max members count fixed
This commit is contained in:
parent
3dfc8d3a79
commit
ba18a2b247
|
@ -36,7 +36,7 @@ StatusModal {
|
||||||
|
|
||||||
property var chatContentModule
|
property var chatContentModule
|
||||||
|
|
||||||
readonly property int maxMembers: 10
|
readonly property int maxMembers: 20
|
||||||
|
|
||||||
function resetSelectedMembers() {
|
function resetSelectedMembers() {
|
||||||
contactList.selectedPubKeys = []
|
contactList.selectedPubKeys = []
|
||||||
|
@ -58,8 +58,7 @@ StatusModal {
|
||||||
header.title: addMembers ? qsTrId("add-members") : (popup.chatDetails ? popup.chatDetails.name : "")
|
header.title: addMembers ? qsTrId("add-members") : (popup.chatDetails ? popup.chatDetails.name : "")
|
||||||
header.subTitle: {
|
header.subTitle: {
|
||||||
if (addMembers) {
|
if (addMembers) {
|
||||||
//% "%1 / 10 members"
|
return qsTr("%1/%2 members").arg(memberCount).arg(maxMembers)
|
||||||
return qsTrId("%1-/-10-members").arg(memberCount)
|
|
||||||
} else {
|
} else {
|
||||||
//% "%1 members"
|
//% "%1 members"
|
||||||
if (currMemberCount > 1) {
|
if (currMemberCount > 1) {
|
||||||
|
@ -134,7 +133,7 @@ StatusModal {
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
Layout.bottomMargin: childrenRect.height
|
Layout.bottomMargin: childrenRect.height
|
||||||
|
|
||||||
visible: chatSectionModule.listOfMyContacts.rowCount() === 0
|
visible: chatSectionModule.listOfMyContacts.count === 0
|
||||||
//% "All your contacts are already in the group"
|
//% "All your contacts are already in the group"
|
||||||
text: qsTrId("group-chat-all-contacts-invited")
|
text: qsTrId("group-chat-all-contacts-invited")
|
||||||
textColor: Style.current.textColor
|
textColor: Style.current.textColor
|
||||||
|
@ -146,12 +145,12 @@ StatusModal {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
visible: popup.addMembers && chatSectionModule.listOfMyContacts.rowCount() > 0
|
visible: popup.addMembers && chatSectionModule.listOfMyContacts.count > 0
|
||||||
model: chatSectionModule.listOfMyContacts
|
model: chatSectionModule.listOfMyContacts
|
||||||
selectMode: memberCount < maxMembers
|
selectMode: memberCount < maxMembers
|
||||||
searchString: searchBox.text.toLowerCase()
|
searchString: searchBox.text.toLowerCase()
|
||||||
onSelectedPubKeysChanged: {
|
onSelectedPubKeysChanged: {
|
||||||
memberCount = popup.chatContentModule.usersModule.model.rowCount() + selectedPubKeys.length;
|
memberCount = popup.chatContentModule.usersModule.model.count + selectedPubKeys.length;
|
||||||
btnSelectMembers.enabled = selectedPubKeys.length > 0
|
btnSelectMembers.enabled = selectedPubKeys.length > 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue