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
}
chatInfoButton.onClicked: {
// Not Refactored Yet
// switch (chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel.chatType) {
// case Constants.chatType.privateGroupChat:
// openPopup(groupInfoPopupComponent, {
// channelType: GroupInfoPopup.ChannelType.ActiveChannel,
// channel: chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel
// })
// break;
// case Constants.chatType.oneToOne:
// openProfilePopup(chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel.id)
// break;
// }
switch (chatContentModule.chatDetails.type) {
case Constants.chatType.privateGroupChat:
// Not Refactored Yet
// openPopup(groupInfoPopupComponent, {
// channelType: GroupInfoPopup.ChannelType.ActiveChannel,
// channel: chatContentRoot.rootStore.chatsModelInst.channelView.activeChannel
// })
break;
case Constants.chatType.oneToOne:
Global.openProfilePopup(chatContentModule.chatDetails.id)
break;
}
}
membersButton.visible: {

View File

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