2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
2021-09-28 15:04:06 +00:00
|
|
|
import utils 1.0
|
2021-11-30 10:50:53 +00:00
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.views 1.0
|
|
|
|
import shared.panels 1.0
|
|
|
|
import shared.status 1.0
|
2021-10-18 15:36:02 +00:00
|
|
|
|
2021-10-01 15:58:36 +00:00
|
|
|
import "../panels"
|
2020-06-11 17:50:36 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
StatusModal {
|
2020-06-11 17:50:36 +00:00
|
|
|
id: popup
|
2021-11-30 10:50:53 +00:00
|
|
|
|
fix: kick and re-invite user to group chat
Fixes: #2601.
Kicking a user and re-inviting them now correctly redisplays the join/decline options. Other combinations of User B leaving or declining an invitation are not handled. Please see the notes below for clarification.
Additionally, the group invite popup (that shows the list of members belonging to the group) correctly shows when a user is kicked or when a user leaves the group in real time. Previously, the popup needed to be reopened to display this.
fix: decline invitation crash
Declining a group invitation was crashing the app. This has been fixed.
### NOTES
1. In the case where User A invites User B to a group, but User B declines (or User B joins, then leaves), then from a status-go standpoint, User B is still part of the group, but the chat is marked as `active: false` for User B. This creates a situation where User B cannot re-join the group once s/he has declined the invitation. @cammellos mentioned there possibly will need to be a refactor of https://github.com/status-im/status-go/blob/cab6281dc520c24912de5b5226b42a2f8415aa40/protocol/messenger.go#L1710 (which, by retaining User B as a member, effectively prevents the re-invitation) once “swipe to delete” is implemented on mobile. There is an activity center notification received for User B that is meant to allow re-joining of the group when the notification is accepted. The activity center notification received from status-go looks like the following:
```json
"activityCenterNotifications": [
{
"id": "0x0e342d33",
"chatId": "e342d33f-dd05-4d7b-b14e-b5335e1a3ee9-0x043bf46aa874c377a34946eab67a32cf36c15907b328216dfce375d169fed7d81c21cada3229db1fd37c762d2c02702111a646657feca6621e2e948febcf378fb4",
"name": "test-22",
"type": 2,
"lastMessage": null,
"message": null,
"timestamp": 1623305612000,
"read": false,
"dismissed": false,
"accepted": false
}
]
```
2021-06-10 07:29:05 +00:00
|
|
|
enum ChannelType {
|
|
|
|
ActiveChannel,
|
|
|
|
ContextChannel
|
|
|
|
}
|
2021-12-08 12:31:28 +00:00
|
|
|
property var chatSectionModule
|
2021-10-22 20:49:47 +00:00
|
|
|
property var store
|
2022-04-12 18:54:01 +00:00
|
|
|
property var messageStore
|
2020-06-22 17:24:01 +00:00
|
|
|
property bool addMembers: false
|
2022-02-17 18:18:05 +00:00
|
|
|
property int currMemberCount: chatContentModule.usersModule.model.count
|
2020-06-22 17:24:01 +00:00
|
|
|
property int memberCount: 1
|
2022-02-14 12:18:25 +00:00
|
|
|
|
fix: kick and re-invite user to group chat
Fixes: #2601.
Kicking a user and re-inviting them now correctly redisplays the join/decline options. Other combinations of User B leaving or declining an invitation are not handled. Please see the notes below for clarification.
Additionally, the group invite popup (that shows the list of members belonging to the group) correctly shows when a user is kicked or when a user leaves the group in real time. Previously, the popup needed to be reopened to display this.
fix: decline invitation crash
Declining a group invitation was crashing the app. This has been fixed.
### NOTES
1. In the case where User A invites User B to a group, but User B declines (or User B joins, then leaves), then from a status-go standpoint, User B is still part of the group, but the chat is marked as `active: false` for User B. This creates a situation where User B cannot re-join the group once s/he has declined the invitation. @cammellos mentioned there possibly will need to be a refactor of https://github.com/status-im/status-go/blob/cab6281dc520c24912de5b5226b42a2f8415aa40/protocol/messenger.go#L1710 (which, by retaining User B as a member, effectively prevents the re-invitation) once “swipe to delete” is implemented on mobile. There is an activity center notification received for User B that is meant to allow re-joining of the group when the notification is accepted. The activity center notification received from status-go looks like the following:
```json
"activityCenterNotifications": [
{
"id": "0x0e342d33",
"chatId": "e342d33f-dd05-4d7b-b14e-b5335e1a3ee9-0x043bf46aa874c377a34946eab67a32cf36c15907b328216dfce375d169fed7d81c21cada3229db1fd37c762d2c02702111a646657feca6621e2e948febcf378fb4",
"name": "test-22",
"type": 2,
"lastMessage": null,
"message": null,
"timestamp": 1623305612000,
"read": false,
"dismissed": false,
"accepted": false
}
]
```
2021-06-10 07:29:05 +00:00
|
|
|
property int channelType: GroupInfoPopup.ChannelType.ActiveChannel
|
2022-02-14 12:18:25 +00:00
|
|
|
property var chatDetails
|
|
|
|
property bool isAdmin: popup.chatSectionModule.activeItem.amIChatAdmin
|
2021-05-25 19:38:18 +00:00
|
|
|
property Component pinnedMessagesPopupComponent
|
2020-06-22 17:24:01 +00:00
|
|
|
|
2022-01-25 22:10:35 +00:00
|
|
|
property var chatContentModule
|
|
|
|
|
2022-03-08 10:02:56 +00:00
|
|
|
readonly property int maxMembers: 20
|
2022-02-14 12:18:25 +00:00
|
|
|
|
|
|
|
function resetSelectedMembers() {
|
|
|
|
contactList.selectedPubKeys = []
|
2021-11-03 12:06:10 +00:00
|
|
|
|
2022-02-17 18:18:05 +00:00
|
|
|
memberCount = popup.chatContentModule.usersModule.model.count
|
2021-11-30 10:50:53 +00:00
|
|
|
}
|
2020-12-11 20:38:10 +00:00
|
|
|
|
2022-02-14 12:18:25 +00:00
|
|
|
function doAddMembers() {
|
|
|
|
if (popup.chatDetails.id && contactList.selectedPubKeys.length > 0) {
|
|
|
|
popup.chatSectionModule.addGroupMembers(popup.chatDetails.id, JSON.stringify(contactList.selectedPubKeys));
|
2021-11-30 10:50:53 +00:00
|
|
|
}
|
|
|
|
popup.close();
|
|
|
|
}
|
2020-12-11 20:38:10 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
height: 504
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
2022-04-04 11:26:30 +00:00
|
|
|
header.title: addMembers ? qsTr("Add members") : (popup.chatDetails ? popup.chatDetails.name : "")
|
2021-11-30 10:50:53 +00:00
|
|
|
header.subTitle: {
|
2022-02-14 12:18:25 +00:00
|
|
|
if (addMembers) {
|
2022-03-08 10:02:56 +00:00
|
|
|
return qsTr("%1/%2 members").arg(memberCount).arg(maxMembers)
|
2021-11-30 10:50:53 +00:00
|
|
|
} else {
|
2022-02-17 18:18:05 +00:00
|
|
|
if (currMemberCount > 1) {
|
2022-04-04 11:26:30 +00:00
|
|
|
return qsTr("%1 members").arg(currMemberCount);
|
2022-02-14 12:18:25 +00:00
|
|
|
}
|
2022-04-04 11:26:30 +00:00
|
|
|
return qsTr("1 member");
|
2021-11-03 12:06:10 +00:00
|
|
|
}
|
2020-06-22 17:24:01 +00:00
|
|
|
}
|
2021-11-30 10:50:53 +00:00
|
|
|
header.editable: !addMembers && popup.isAdmin
|
|
|
|
header.icon.isLetterIdenticon: true
|
2022-02-14 12:18:25 +00:00
|
|
|
header.icon.name: popup.chatDetails ? popup.chatDetails.name : ""
|
|
|
|
header.icon.background.color: popup.chatDetails ? popup.chatDetails.color : "transparent"
|
2021-11-30 10:50:53 +00:00
|
|
|
|
|
|
|
onEditButtonClicked: renameGroupPopup.open()
|
2020-06-22 17:24:01 +00:00
|
|
|
|
2021-02-17 20:36:10 +00:00
|
|
|
onClosed: {
|
2022-01-25 22:10:35 +00:00
|
|
|
chatSectionModule.clearMyContacts()
|
2021-02-17 20:36:10 +00:00
|
|
|
popup.destroy();
|
refactor(ChannelContextMenu): remove dependency on active channel
This commit does a bunch of things:
- First and foremost, it removes the active channel dependency.
This is needed to have it operate on the correct channel object,
without forcing us to change the active channel (e.g. right-clicking
on a channel item that's not active, will make it active eventually)
- To make that work, this commit changes the `ChannelContextMenu`
to receive a `ChatItemView`, so it can be used for things like determining
what menu options are shown, what members are in a group, whether
someone is admin of a group etc.
- This also required a new `QtProperty` called `contextChannel`.
The reason this is required, is because in some cases, like receiving
members count of groups, we need a complete `ChatItemView` object
as we don't have access to certain APIs otherwise.
- Unfortunately, we can't pass down `activeChannel` every where for that
because sometimes the context menu should not actually operate on
the active channel.
Fixes: #1755
2021-01-25 15:58:33 +00:00
|
|
|
}
|
|
|
|
|
2020-06-22 17:24:01 +00:00
|
|
|
onOpened: {
|
2022-02-14 12:18:25 +00:00
|
|
|
chatSectionModule.populateMyContacts(popup.chatContentModule.usersModule.getMembersPublicKeys())
|
2022-01-25 22:10:35 +00:00
|
|
|
|
2020-06-22 17:24:01 +00:00
|
|
|
addMembers = false;
|
2022-02-14 12:18:25 +00:00
|
|
|
|
2020-06-22 17:24:01 +00:00
|
|
|
btnSelectMembers.enabled = false;
|
|
|
|
resetSelectedMembers();
|
|
|
|
}
|
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
ColumnLayout {
|
|
|
|
id: addMembersItem
|
2021-11-03 12:06:10 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: Style.current.halfPadding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2021-11-03 12:06:10 +00:00
|
|
|
|
2022-02-14 12:18:25 +00:00
|
|
|
width: parent.width - 2 * Style.current.padding
|
|
|
|
height: parent.height
|
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
visible: addMembers
|
2021-11-03 12:06:10 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
spacing: Style.current.padding
|
2020-06-15 12:51:04 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
StatusBaseInput {
|
2020-06-22 17:24:01 +00:00
|
|
|
id: searchBox
|
2022-02-14 12:18:25 +00:00
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignTop
|
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
implicitHeight: 36
|
2022-04-04 11:26:30 +00:00
|
|
|
placeholderText: qsTr("Search")
|
2021-11-30 10:50:53 +00:00
|
|
|
placeholderFont.pixelSize: 15
|
2022-02-14 12:18:25 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
icon.name: "search"
|
|
|
|
icon.width: 17
|
|
|
|
icon.height: 17
|
2020-06-22 17:24:01 +00:00
|
|
|
}
|
|
|
|
|
2020-12-11 20:38:10 +00:00
|
|
|
NoFriendsRectangle {
|
2021-11-30 10:50:53 +00:00
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
Layout.bottomMargin: childrenRect.height
|
2022-02-14 12:18:25 +00:00
|
|
|
|
|
|
|
visible: popup.store.contactsStore.myContactsModel.count === 0
|
2021-07-13 07:56:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
NoFriendsRectangle {
|
2021-11-30 10:50:53 +00:00
|
|
|
Layout.preferredHeight: childrenRect.height
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
|
|
|
Layout.bottomMargin: childrenRect.height
|
2022-02-14 12:18:25 +00:00
|
|
|
|
2022-03-08 10:02:56 +00:00
|
|
|
visible: chatSectionModule.listOfMyContacts.count === 0
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("All your contacts are already in the group")
|
2022-02-14 12:18:25 +00:00
|
|
|
textColor: Style.current.textColor
|
2020-08-10 02:14:21 +00:00
|
|
|
}
|
|
|
|
|
2021-10-01 15:58:36 +00:00
|
|
|
ContactListPanel {
|
2020-12-11 20:38:10 +00:00
|
|
|
id: contactList
|
2022-02-14 12:18:25 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
Layout.fillHeight: true
|
|
|
|
Layout.fillWidth: true
|
2022-02-14 12:18:25 +00:00
|
|
|
|
2022-03-08 10:02:56 +00:00
|
|
|
visible: popup.addMembers && chatSectionModule.listOfMyContacts.count > 0
|
2022-01-25 22:10:35 +00:00
|
|
|
model: chatSectionModule.listOfMyContacts
|
2020-12-11 20:38:10 +00:00
|
|
|
selectMode: memberCount < maxMembers
|
|
|
|
searchString: searchBox.text.toLowerCase()
|
2022-02-14 12:18:25 +00:00
|
|
|
onSelectedPubKeysChanged: {
|
2022-03-08 10:02:56 +00:00
|
|
|
memberCount = popup.chatContentModule.usersModule.model.count + selectedPubKeys.length;
|
2022-02-14 12:18:25 +00:00
|
|
|
btnSelectMembers.enabled = selectedPubKeys.length > 0
|
2020-06-22 17:24:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-11 17:50:36 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
ColumnLayout {
|
2020-06-22 17:24:01 +00:00
|
|
|
id: groupInfoItem
|
2020-06-11 17:50:36 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: Style.current.padding
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
|
2022-02-14 12:18:25 +00:00
|
|
|
width: parent.width - 2*Style.current.padding
|
|
|
|
height: parent.height - 2*Style.current.padding
|
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
visible: !addMembers
|
|
|
|
spacing: Style.current.padding
|
2020-06-11 17:50:36 +00:00
|
|
|
|
2021-05-25 19:38:18 +00:00
|
|
|
StatusSettingsLineButton {
|
2022-04-12 18:54:01 +00:00
|
|
|
property int pinnedCount: popup.chatContentModule.pinnedMessagesModel.count
|
2021-05-25 19:38:18 +00:00
|
|
|
|
|
|
|
id: pinnedMessagesBtn
|
|
|
|
visible: pinnedCount > 0
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Pinned messages")
|
2021-05-25 19:38:18 +00:00
|
|
|
currentValue: pinnedCount
|
2022-04-12 18:54:01 +00:00
|
|
|
onClicked: {
|
|
|
|
popup.store.messageStore.messageModule = popup.chatContentModule.messagesModule
|
|
|
|
popup.store.messageStore.chatSectionModule = popup.chatSectionModule
|
|
|
|
|
|
|
|
Global.openPopup(pinnedMessagesPopupComponent, {
|
|
|
|
store: popup.store,
|
|
|
|
messageStore: popup.store.messageStore,
|
|
|
|
pinnedMessagesModel: popup.chatContentModule.pinnedMessagesModel,
|
|
|
|
messageToPin: ""
|
|
|
|
})
|
|
|
|
}
|
2021-09-28 15:04:06 +00:00
|
|
|
iconSource: Style.svg("pin")
|
2022-04-12 18:54:01 +00:00
|
|
|
anchors.left: undefined
|
|
|
|
anchors.right: undefined
|
|
|
|
width: parent.width
|
2021-05-25 19:38:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
id: separator2
|
|
|
|
visible: pinnedMessagesBtn.visible
|
|
|
|
}
|
fix: kick and re-invite user to group chat
Fixes: #2601.
Kicking a user and re-inviting them now correctly redisplays the join/decline options. Other combinations of User B leaving or declining an invitation are not handled. Please see the notes below for clarification.
Additionally, the group invite popup (that shows the list of members belonging to the group) correctly shows when a user is kicked or when a user leaves the group in real time. Previously, the popup needed to be reopened to display this.
fix: decline invitation crash
Declining a group invitation was crashing the app. This has been fixed.
### NOTES
1. In the case where User A invites User B to a group, but User B declines (or User B joins, then leaves), then from a status-go standpoint, User B is still part of the group, but the chat is marked as `active: false` for User B. This creates a situation where User B cannot re-join the group once s/he has declined the invitation. @cammellos mentioned there possibly will need to be a refactor of https://github.com/status-im/status-go/blob/cab6281dc520c24912de5b5226b42a2f8415aa40/protocol/messenger.go#L1710 (which, by retaining User B as a member, effectively prevents the re-invitation) once “swipe to delete” is implemented on mobile. There is an activity center notification received for User B that is meant to allow re-joining of the group when the notification is accepted. The activity center notification received from status-go looks like the following:
```json
"activityCenterNotifications": [
{
"id": "0x0e342d33",
"chatId": "e342d33f-dd05-4d7b-b14e-b5335e1a3ee9-0x043bf46aa874c377a34946eab67a32cf36c15907b328216dfce375d169fed7d81c21cada3229db1fd37c762d2c02702111a646657feca6621e2e948febcf378fb4",
"name": "test-22",
"type": 2,
"lastMessage": null,
"message": null,
"timestamp": 1623305612000,
"read": false,
"dismissed": false,
"accepted": false
}
]
```
2021-06-10 07:29:05 +00:00
|
|
|
|
2020-06-11 17:50:36 +00:00
|
|
|
ListView {
|
|
|
|
id: memberList
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Layout.fillHeight: true
|
2022-02-02 10:27:26 +00:00
|
|
|
clip: true
|
2022-01-25 22:10:35 +00:00
|
|
|
model: popup.chatContentModule.usersModule.model
|
2021-11-30 10:50:53 +00:00
|
|
|
delegate: StatusListItem {
|
2020-09-17 19:39:02 +00:00
|
|
|
id: contactRow
|
2020-10-20 19:19:10 +00:00
|
|
|
|
2022-06-12 16:17:18 +00:00
|
|
|
title: model.displayName
|
2021-11-30 10:50:53 +00:00
|
|
|
statusListItemTitle.font.pixelSize: 17
|
|
|
|
statusListItemTitleAside.font.pixelSize: 17
|
2022-04-04 11:26:30 +00:00
|
|
|
label: model.isAdmin ? qsTr("Admin"): ""
|
2022-01-25 22:10:35 +00:00
|
|
|
image.source: model.icon
|
2022-06-12 16:17:18 +00:00
|
|
|
ringSettings.ringSpecModel: Utils.getColorHashAsJson(model.pubKey)
|
2022-04-11 08:00:57 +00:00
|
|
|
icon: StatusIconSettings {
|
2022-06-12 16:17:18 +00:00
|
|
|
color: Theme.palette.userCustomizationColors[Utils.colorIdForPubkey(model.pubKey)]
|
2022-04-11 08:00:57 +00:00
|
|
|
charactersLen: 2
|
|
|
|
isLetterIdenticon: model.icon === ""
|
|
|
|
height: isLetterIdenticon ? 40 : 20
|
|
|
|
width: isLetterIdenticon ? 40 : 20
|
|
|
|
}
|
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
components: [
|
|
|
|
StatusFlatRoundButton {
|
|
|
|
id: moreActionsBtn
|
|
|
|
type: StatusFlatRoundButton.Type.Tertiary
|
|
|
|
color: "transparent"
|
|
|
|
icon.name: "more"
|
|
|
|
icon.color: Theme.palette.baseColor1
|
|
|
|
visible: !model.isAdmin && popup.isAdmin
|
2020-10-20 19:19:10 +00:00
|
|
|
onClicked: {
|
|
|
|
contextMenu.popup(-contextMenu.width / 2 + moreActionsBtn.width / 2, moreActionsBtn.height + 10)
|
|
|
|
}
|
2021-11-30 10:50:53 +00:00
|
|
|
StatusPopupMenu {
|
2020-10-20 19:19:10 +00:00
|
|
|
id: contextMenu
|
2021-11-30 10:50:53 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
icon.name: "admin"
|
2021-04-27 17:26:13 +00:00
|
|
|
icon.width: 16
|
|
|
|
icon.height: 16
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Make Admin")
|
2022-06-12 16:17:18 +00:00
|
|
|
onTriggered: popup.chatSectionModule.makeAdmin("", popup.chatDetails.id, model.pubKey)
|
2020-06-12 14:01:46 +00:00
|
|
|
}
|
2021-11-30 10:50:53 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
icon.name: "remove-contact"
|
2021-04-27 17:26:13 +00:00
|
|
|
icon.width: 16
|
|
|
|
icon.height: 16
|
2021-11-30 10:50:53 +00:00
|
|
|
type: StatusMenuItem.Type.Danger
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Remove From Group")
|
2022-06-12 16:17:18 +00:00
|
|
|
onTriggered: popup.chatSectionModule.removeMemberFromGroupChat("", popup.chatDetails.id, model.pubKey)
|
2020-06-12 14:01:46 +00:00
|
|
|
}
|
|
|
|
}
|
2020-06-11 17:50:36 +00:00
|
|
|
}
|
2021-11-30 10:50:53 +00:00
|
|
|
]
|
2022-02-16 16:13:45 +00:00
|
|
|
onTitleClicked: {
|
2022-06-12 16:17:18 +00:00
|
|
|
Global.openProfilePopup(model.pubKey, popup)
|
2020-06-11 17:50:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-22 17:24:01 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
leftButtons: [
|
|
|
|
StatusRoundButton {
|
|
|
|
visible: popup.addMembers
|
2021-01-28 11:17:46 +00:00
|
|
|
icon.name: "arrow-right"
|
|
|
|
icon.width: 20
|
|
|
|
icon.height: 16
|
2021-10-21 15:07:13 +00:00
|
|
|
icon.rotation: 180
|
2021-11-30 10:50:53 +00:00
|
|
|
onClicked: {
|
|
|
|
popup.addMembers = false;
|
|
|
|
popup.resetSelectedMembers();
|
2020-06-22 17:24:01 +00:00
|
|
|
}
|
|
|
|
}
|
2021-11-30 10:50:53 +00:00
|
|
|
]
|
2020-06-22 17:24:01 +00:00
|
|
|
|
2021-11-30 10:50:53 +00:00
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
2022-02-18 10:58:42 +00:00
|
|
|
visible: !popup.addMembers && popup.isAdmin
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add members")
|
2021-11-30 10:50:53 +00:00
|
|
|
onClicked: {
|
|
|
|
popup.addMembers = true;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
StatusButton {
|
2021-11-03 12:06:10 +00:00
|
|
|
id: btnSelectMembers
|
2021-11-30 10:50:53 +00:00
|
|
|
visible: popup.addMembers
|
|
|
|
enabled: popup.memberCount >= popup.currMemberCount
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add selected")
|
2021-11-30 10:50:53 +00:00
|
|
|
onClicked: popup.doAddMembers()
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
RenameGroupPopup {
|
|
|
|
id: renameGroupPopup
|
2022-03-04 13:50:06 +00:00
|
|
|
activeChannelName: popup.chatDetails ? popup.chatDetails.name : ""
|
2021-12-08 12:31:28 +00:00
|
|
|
onDoRename: {
|
|
|
|
popup.chatSectionModule.renameGroupChat(popup.chatSectionModule.activeItem.id, groupName)
|
|
|
|
popup.header.title = groupName
|
|
|
|
close()
|
|
|
|
}
|
2020-06-22 17:24:01 +00:00
|
|
|
}
|
2020-06-11 17:50:36 +00:00
|
|
|
}
|