Skip to content

Commit

Permalink
ProfileContextMenu.removeNickname signal aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
micieslak committed Nov 13, 2024
1 parent b09713a commit 74113cb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
5 changes: 2 additions & 3 deletions ui/app/AppLayouts/Communities/panels/MembersTabPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,8 @@ Item {
onReviewContactRequest: Global.openReviewContactRequestPopup(memberContextMenuView.pubKey, null)
onSendContactRequest: Global.openContactRequestPopup(memberContextMenuView.pubKey, null)
onEditNickname: Global.openNicknamePopupRequested(memberContextMenuView.pubKey, null)
onRemoveNickname: (displayName) => {
root.rootStore.contactsStore.changeContactNickname(memberContextMenuView.pubKey, "", displayName, true)
}
onRemoveNickname: root.rootStore.contactsStore.changeContactNickname(memberContextMenuView.pubKey,
"", memberContextMenuView.displayName, true)
onUnblockContact: Global.unblockContactRequested(memberContextMenuView.pubKey)
onMarkAsUntrusted: Global.markAsUntrustedRequested(memberContextMenuView.pubKey)
onRemoveTrustStatus: root.rootStore.contactsStore.removeTrustStatus(memberContextMenuView.pubKey)
Expand Down
10 changes: 5 additions & 5 deletions ui/app/AppLayouts/Profile/views/ContactsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ SettingsContentBase {
property string pubKey

onOpenProfileClicked: Global.openProfilePopup(contactContextMenu.pubKey, null, null)
onCreateOneToOneChat: root.contactsStore.joinPrivateChat(contactContextMenu.pubKey)
onReviewContactRequest: Global.openReviewContactRequestPopup(contactContextMenu.pubKey, null)
onSendContactRequest: Global.openContactRequestPopup(contactContextMenu.pubKey, null)
onEditNickname: Global.openNicknamePopupRequested(contactContextMenu.pubKey, null)
onRemoveNickname: (displayName) => {
root.contactsStore.changeContactNickname(contactContextMenu.pubKey, "", displayName, true)
}
onUnblockContact: Global.unblockContactRequested(contactContextMenu.pubKey)
onMarkAsUntrusted: Global.markAsUntrustedRequested(contactContextMenu.pubKey)
onRemoveTrustStatus: root.contactsStore.removeTrustStatus(contactContextMenu.pubKey)
onRemoveContact: Global.removeContactRequested(contactContextMenu.pubKey)
onBlockContact: Global.blockContactRequested(contactContextMenu.pubKey)

onCreateOneToOneChat: root.contactsStore.joinPrivateChat(contactContextMenu.pubKey)
onRemoveTrustStatus: root.contactsStore.removeTrustStatus(contactContextMenu.pubKey)
onRemoveNickname: root.contactsStore.changeContactNickname(contactContextMenu.pubKey, "",
contactContextMenu.displayName, true)
onClosed: destroy()
}
}
Expand Down
10 changes: 4 additions & 6 deletions ui/imports/shared/views/chat/MessageView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1211,17 +1211,15 @@ Loader {
onReviewContactRequest: Global.openReviewContactRequestPopup(profileContextMenu.pubKey, null)
onSendContactRequest: Global.openContactRequestPopup(profileContextMenu.pubKey, null)
onEditNickname: Global.openNicknamePopupRequested(profileContextMenu.pubKey, null)
onRemoveNickname: () => {
root.rootStore.contactsStore.changeContactNickname(profileContextMenu.pubKey, "", profileContextMenu.displayName, true)
}
onRemoveNickname: root.rootStore.contactsStore.changeContactNickname(profileContextMenu.pubKey,
"", profileContextMenu.displayName, true)
onUnblockContact: Global.unblockContactRequested(profileContextMenu.pubKey)
onMarkAsUntrusted: Global.markAsUntrustedRequested(profileContextMenu.pubKey)
onRemoveTrustStatus: root.rootStore.contactsStore.removeTrustStatus(profileContextMenu.pubKey)
onRemoveContact: Global.removeContactRequested(profileContextMenu.pubKey)
onBlockContact: Global.blockContactRequested(profileContextMenu.pubKey)
onRemoveFromGroup: () => {
root.store.removeMemberFromGroupChat(profileContextMenu.pubKey)
}
onRemoveFromGroup: root.store.removeMemberFromGroupChat(profileContextMenu.pubKey)

onOpened: root.setMessageActive(root.messageId, true)
onClosed: {
root.setMessageActive(root.messageId, false)
Expand Down
4 changes: 2 additions & 2 deletions ui/imports/shared/views/chat/ProfileContextMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ StatusMenu {
signal reviewContactRequest
signal sendContactRequest
signal editNickname
signal removeNickname(string displayName)
signal removeNickname
signal unblockContact
signal markAsUntrusted
signal removeTrustStatus
Expand Down Expand Up @@ -129,7 +129,7 @@ StatusMenu {
icon.name: "delete"
type: StatusAction.Type.Danger
enabled: (root.profileType === Constants.profileType.blocked || root.profileType === Constants.profileType.regular) && root.hasLocalNickname
onTriggered: root.removeNickname(root.displayName)
onTriggered: root.removeNickname()
}

// Unblock User
Expand Down

0 comments on commit 74113cb

Please sign in to comment.