feat(community): add emoji for channel header and identifier as well

This commit is contained in:
Jonathan Rainville 2022-03-14 15:32:52 -04:00
parent 4b91888433
commit 43e58e357c
6 changed files with 16 additions and 3 deletions

@ -1 +1 @@
Subproject commit 93f9214aaddb8f04be093ecd882e81d848d95b2f
Subproject commit b6c3231e307cfb20fbf2d4afc228619afdfd41cb

View File

@ -89,6 +89,8 @@ QtObject {
property string currentCurrency: walletSection.currentCurrency
property string signingPhrase: walletSection.signingPhrase
property string channelEmoji: chatCommunitySectionModule && chatCommunitySectionModule.emoji
property string gasPrice: profileSectionModule.ensUsernamesModule.gasPrice
property ListModel addToGroupContacts: ListModel {}

View File

@ -95,6 +95,8 @@ ColumnLayout {
chatInfoButton.image.source: chatContentModule? chatContentModule.chatDetails.icon : ""
chatInfoButton.image.isIdenticon: chatContentModule? chatContentModule.chatDetails.isIdenticon : false
chatInfoButton.icon.color: chatContentModule? chatContentModule.chatDetails.color : ""
chatInfoButton.icon.emoji: chatContentModule? chatContentModule.chatDetails.emoji : ""
chatInfoButton.icon.emojiSize: "24x24"
chatInfoButton.type: chatContentModule? chatContentModule.chatDetails.type : Constants.chatType.unknown
chatInfoButton.pinnedMessagesCount: chatContentModule? chatContentModule.pinnedMessagesModel.count : 0
chatInfoButton.muted: chatContentModule? chatContentModule.chatDetails.muted : false
@ -384,6 +386,7 @@ ColumnLayout {
usersStore: chatContentRoot.usersStore
stickersLoaded: chatContentRoot.stickersLoaded
isChatBlocked: chatContentRoot.isBlocked
channelEmoji: chatContentModule.chatDetails.emoji || ""
onShowReplyArea: {
let obj = messageStore.getMessageByIdAsJson(messageId)
if (!obj) {

View File

@ -25,6 +25,7 @@ Item {
property var messageStore
property var usersStore
property var contactsStore
property string channelEmoji
property bool stickersLoaded: false
property alias chatLogView: chatLogView
@ -244,6 +245,7 @@ Item {
messageStore: root.messageStore
usersStore: root.usersStore
contactsStore: root.contactsStore
channelEmoji: root.channelEmoji
isChatBlocked: root.isChatBlocked
messageContextMenu: messageContextMenuInst

View File

@ -2,6 +2,7 @@ import QtQuick 2.14
import shared 1.0
import shared.panels 1.0
import StatusQ.Core.Utils 0.1 as StatusQUtils
import utils 1.0
Column {
@ -15,6 +16,7 @@ Column {
property string chatName: ""
property int chatType: -1
property string chatColor: ""
property string chatEmoji: ""
property string chatIcon: ""
property bool chatIconIsIdenticon: true
property bool didIJoinedChat: true
@ -45,8 +47,10 @@ Column {
StyledText {
visible: root.chatType !== Constants.chatType.oneToOne
text: root.chatName.charAt(0).toUpperCase()
opacity: 0.7
text: root.chatEmoji ?
StatusQUtils.Emoji.parse(root.chatEmoji, StatusQUtils.Emoji.size.veryBig) :
root.chatName.charAt(0).toUpperCase()
opacity: root.chatEmoji ? 1 : 0.7
font.weight: Font.Bold
font.pixelSize: 51
color: Style.current.white

View File

@ -22,6 +22,7 @@ Column {
property var usersStore
property var contactsStore
property var messageContextMenu
property string channelEmoji
// Once we redo qml we will know all section/chat related details in each message form the parent components
// without an explicit need to fetch those details via message store/module.
@ -293,6 +294,7 @@ Column {
chatName: root.senderDisplayName
chatType: root.messageStore.getChatType()
chatColor: root.messageStore.getChatColor()
chatEmoji: root.channelEmoji
amIChatAdmin: root.messageStore.amIChatAdmin()
chatIcon: root.senderIcon
chatIconIsIdenticon: root.isSenderIconIdenticon