fix: small fixes to the profile popup
This commit is contained in:
parent
6e357cb5e2
commit
0c0baf29e8
|
@ -51,7 +51,7 @@ proc addContact*(self: ContactModel, id: string, localNickname: string): string
|
|||
self.events.emit("contactAdded", Args())
|
||||
|
||||
proc addContact*(self: ContactModel, id: string): string =
|
||||
result = self.addContact(id)
|
||||
result = self.addContact(id, "")
|
||||
|
||||
proc removeContact*(self: ContactModel, id: string) =
|
||||
let contact = self.getContactByID(id)
|
||||
|
|
|
@ -83,6 +83,7 @@ PopupMenu {
|
|||
}
|
||||
onClicked: {
|
||||
profilePopup.open()
|
||||
messageContextMenu.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +96,10 @@ PopupMenu {
|
|||
id: viewProfileAction
|
||||
//% "View profile"
|
||||
text: qsTrId("view-profile")
|
||||
onTriggered: profilePopup.open()
|
||||
onTriggered: {
|
||||
profilePopup.open()
|
||||
messageContextMenu.close()
|
||||
}
|
||||
icon.source: "../../../img/profileActive.svg"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
|
@ -106,7 +110,10 @@ PopupMenu {
|
|||
qsTrId("send-message") :
|
||||
//% "Reply to"
|
||||
qsTrId("reply-to")
|
||||
onTriggered: messageContextMenu.isProfile ? chatsModel.joinChat(profilePopup.fromAuthor, Constants.chatTypeOneToOne) : showReplyArea()
|
||||
onTriggered: {
|
||||
messageContextMenu.isProfile ? chatsModel.joinChat(profilePopup.fromAuthor, Constants.chatTypeOneToOne) : showReplyArea()
|
||||
messageContextMenu.close()
|
||||
}
|
||||
icon.source: "../../../img/messageActive.svg"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
|
|
|
@ -78,6 +78,7 @@ ModalPopup {
|
|||
disabled: popup.nicknameLength === 0 || popup.nicknameTooLong
|
||||
onClicked: {
|
||||
userName = nicknameInput.textField.text
|
||||
nickname = nicknameInput.textField.text
|
||||
profileModel.changeContactNickname(fromAuthor, nicknameInput.textField.text)
|
||||
popup.close()
|
||||
}
|
||||
|
|
|
@ -8,12 +8,12 @@ import "./"
|
|||
|
||||
ModalPopup {
|
||||
id: popup
|
||||
property string identicon: ""
|
||||
property string userName: ""
|
||||
property string nickname: ""
|
||||
property string fromAuthor: ""
|
||||
property string text: ""
|
||||
property string alias: ""
|
||||
property var identicon: ""
|
||||
property var userName: ""
|
||||
property var nickname: ""
|
||||
property var fromAuthor: ""
|
||||
property var text: ""
|
||||
property var alias: ""
|
||||
|
||||
property bool showQR: false
|
||||
property bool isEnsVerified: false
|
||||
|
@ -34,7 +34,7 @@ ModalPopup {
|
|||
}
|
||||
|
||||
function openPopup(userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam) {
|
||||
setPopupData(userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam);
|
||||
setPopupData(userNameParam, fromAuthorParam, identiconParam, textParam, nicknameParam)
|
||||
popup.open()
|
||||
}
|
||||
|
||||
|
|
|
@ -152,6 +152,7 @@ DISTFILES += \
|
|||
app/AppLayouts/Chat/components/EmojiCategoryButton.qml \
|
||||
app/AppLayouts/Chat/components/EmojiPopup.qml \
|
||||
app/AppLayouts/Chat/components/EmojiReaction.qml \
|
||||
app/AppLayouts/Chat/components/ProfilePopup.qml \
|
||||
app/AppLayouts/Chat/components/EmojiSection.qml \
|
||||
app/AppLayouts/Chat/components/InviteFriendsPopup.qml \
|
||||
app/AppLayouts/Chat/components/MessageContextMenu.qml \
|
||||
|
|
Loading…
Reference in New Issue