fix(@desktop/groups): wrong message when all contacts have been added to a group chat

This commit is contained in:
Andrei Smirnov 2021-07-13 10:56:18 +03:00 committed by Iuri Matias
parent 42b92a5853
commit b27a52bfce
2 changed files with 13 additions and 3 deletions

View File

@ -166,8 +166,17 @@ ModalPopup {
}
NoFriendsRectangle {
id: noContactsRect
visible: contactList.membersData.count === 0
visible: contactList.membersData.count === 0 && memberCount === 0
anchors.top: searchBox.bottom
anchors.topMargin: Style.current.xlPadding
anchors.horizontalCenter: parent.horizontalCenter
}
NoFriendsRectangle {
visible: contactList.membersData.count === 0 && memberCount > 0
width: 340
text: qsTr("All your contacts are already in the group")
textColor: Style.current.textColor
anchors.top: searchBox.bottom
anchors.topMargin: Style.current.xlPadding
anchors.horizontalCenter: parent.horizontalCenter

View File

@ -8,6 +8,7 @@ Item {
width: 260
//% "You dont have any contacts yet. Invite your friends to start chatting."
property string text: qsTrId("you-don-t-have-any-contacts-yet--invite-your-friends-to-start-chatting-")
property alias textColor: noContacts.color
StyledText {
id: noContacts
text: noContactsRect.text
@ -25,7 +26,7 @@ Item {
text: qsTrId("invite-friends")
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: noContacts.bottom
anchors.topMargin: Style.current.xlPadding
anchors.topMargin: Style.current.padding
onClicked: inviteFriendsPopup.open()
}
InviteFriendsPopup {