feat(@desktop/wallet): align emoji with mobile

Closes: #12421
This commit is contained in:
Sale Djenic 2023-10-12 18:20:55 +02:00 committed by saledjenic
parent e31d8ebd3e
commit ae915b6036
3 changed files with 12 additions and 6 deletions

View File

@ -8,6 +8,7 @@ import StatusQ.Core.Theme 0.1
import StatusQ.Controls 0.1
import StatusQ.Popups 0.1
import StatusQ.Controls.Validators 0.1
import StatusQ.Core.Utils 0.1 as StatusQUtils
import utils 1.0
@ -35,7 +36,8 @@ StatusModal {
enabled: popup.opened
target: emojiPopup
function onEmojiSelected(emojiText: string, atCursor: bool) {
popup.contentItem.accountNameInput.input.asset.emoji = emojiText
let emoji = StatusQUtils.Emoji.deparse(emojiText)
popup.contentItem.accountNameInput.input.asset.emoji = emoji
}
}
@ -112,9 +114,11 @@ StatusModal {
objectName: "renameAccountModalSaveBtn"
text: qsTr("Change Name")
enabled: accountNameInput.text !== "" && accountNameInput.valid
&& (accountNameInput.text !== popup.account.name
|| (accountColorInput.selectedColorIndex >= 0 && accountColorInput.selectedColor !== popup.account.color))
enabled: accountNameInput.text !== "" &&
accountNameInput.valid &&
(accountNameInput.text !== popup.account.name ||
accountColorInput.selectedColorIndex >= 0 && accountColorInput.selectedColor !== popup.account.color ||
accountNameInput.input.asset.emoji !== popup.account.emoji)
MessageDialog {
id: changeError

View File

@ -70,7 +70,8 @@ Item {
target: root.store.emojiPopup
function onEmojiSelected (emojiText, atCursor) {
root.store.addAccountModule.selectedEmoji = emojiText
let emoji = StatusQUtils.Emoji.deparse(emojiText)
root.store.addAccountModule.selectedEmoji = emoji
}
}

View File

@ -82,7 +82,8 @@ Item {
root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.importFromKeycard
function onEmojiSelected (emojiText, atCursor) {
d.observedAccount.emoji = emojiText
let emoji = StatusQUtils.Emoji.deparse(emojiText)
d.observedAccount.emoji = emoji
}
}