fix(chat): fix 1-1 chat delete and profile top bar click

Fixes #4483 and #4484
This commit is contained in:
Jonathan Rainville 2022-01-18 10:56:57 -05:00 committed by Sale Djenic
parent 35df41e669
commit 349cf4f0ef
2 changed files with 13 additions and 13 deletions

View File

@ -106,18 +106,18 @@ ColumnLayout {
chatContentModule.chatDetails.type !== Constants.chatType.communityChat chatContentModule.chatDetails.type !== Constants.chatType.communityChat
} }
chatInfoButton.onClicked: { chatInfoButton.onClicked: {
switch (chatContentModule.chatDetails.type) {
case Constants.chatType.privateGroupChat:
// Not Refactored Yet // Not Refactored Yet
// switch (chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel.chatType) {
// case Constants.chatType.privateGroupChat:
// openPopup(groupInfoPopupComponent, { // openPopup(groupInfoPopupComponent, {
// channelType: GroupInfoPopup.ChannelType.ActiveChannel, // channelType: GroupInfoPopup.ChannelType.ActiveChannel,
// channel: chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel // channel: chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel
// }) // })
// break; break;
// case Constants.chatType.oneToOne: case Constants.chatType.oneToOne:
// openProfilePopup(chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel.id) Global.openProfilePopup(chatContentModule.chatDetails.id)
// break; break;
// } }
} }
membersButton.visible: { membersButton.visible: {

View File

@ -221,7 +221,7 @@ StatusPopupMenu {
close() close()
} }
onConfirmButtonClicked: { onConfirmButtonClicked: {
if(root.isCommunityChat || root.chatType === Constants.chatType.oneToOne) if(root.isCommunityChat)
root.deleteChat(root.chatId) root.deleteChat(root.chatId)
else else
root.leaveChat(root.chatId) root.leaveChat(root.chatId)