Remove obsolete emoji basePath workaround
This commit is contained in:
parent
5650be60a8
commit
07b8d35fb3
5 changed files with 9 additions and 14 deletions
|
@ -10,14 +10,13 @@ PhotoTextsListItem {
|
||||||
photoData: photo_small || ({})
|
photoData: photo_small || ({})
|
||||||
}
|
}
|
||||||
property int ownUserId
|
property int ownUserId
|
||||||
property url emojiBase: "../js/emoji/"
|
|
||||||
|
|
||||||
// chat title
|
// chat title
|
||||||
primaryText.text: title ? Emoji.emojify(title + ( display.notification_settings.mute_for > 0 ? " 🔇" : "" ), Theme.fontSizeMedium, emojiBase) : qsTr("Unknown")
|
primaryText.text: title ? Emoji.emojify(title + ( display.notification_settings.mute_for > 0 ? " 🔇" : "" ), Theme.fontSizeMedium) : qsTr("Unknown")
|
||||||
// last user
|
// last user
|
||||||
prologSecondaryText.text: is_channel ? "" : ( last_message_sender_id ? ( last_message_sender_id !== ownUserId ? Emoji.emojify(Functions.getUserName(tdLibWrapper.getUserInformation(last_message_sender_id)), primaryText.font.pixelSize) : qsTr("You") ) : qsTr("Unknown") )
|
prologSecondaryText.text: is_channel ? "" : ( last_message_sender_id ? ( last_message_sender_id !== ownUserId ? Emoji.emojify(Functions.getUserName(tdLibWrapper.getUserInformation(last_message_sender_id)), primaryText.font.pixelSize) : qsTr("You") ) : qsTr("Unknown") )
|
||||||
// last message
|
// last message
|
||||||
secondaryText.text: last_message_text ? Emoji.emojify(Functions.enhanceHtmlEntities(last_message_text), Theme.fontSizeExtraSmall, emojiBase) : qsTr("Unknown")
|
secondaryText.text: last_message_text ? Emoji.emojify(Functions.enhanceHtmlEntities(last_message_text), Theme.fontSizeExtraSmall) : qsTr("Unknown")
|
||||||
// message date
|
// message date
|
||||||
tertiaryText.text: ( last_message_date ? Functions.getDateTimeElapsed(last_message_date) : qsTr("Unknown") ) + Emoji.emojify(last_message_status, tertiaryText.font.pixelSize)
|
tertiaryText.text: ( last_message_date ? Functions.getDateTimeElapsed(last_message_date) : qsTr("Unknown") ) + Emoji.emojify(last_message_status, tertiaryText.font.pixelSize)
|
||||||
unreadCount: unread_count
|
unreadCount: unread_count
|
||||||
|
|
|
@ -106,11 +106,9 @@ Item {
|
||||||
id: canAnswerDelegate
|
id: canAnswerDelegate
|
||||||
TextSwitch {
|
TextSwitch {
|
||||||
id: optionDelegate
|
id: optionDelegate
|
||||||
// TextSwitch changes the html base path:
|
|
||||||
property url emojiBase: "../js/emoji/"
|
|
||||||
width: pollMessageComponent.width
|
width: pollMessageComponent.width
|
||||||
automaticCheck: false
|
automaticCheck: false
|
||||||
text: Emoji.emojify(modelData.text, Theme.fontSizeMedium, emojiBase)
|
text: Emoji.emojify(modelData.text, Theme.fontSizeMedium)
|
||||||
checked: pollMessageComponent.chosenIndexes.indexOf(index) > -1
|
checked: pollMessageComponent.chosenIndexes.indexOf(index) > -1
|
||||||
onClicked: {
|
onClicked: {
|
||||||
pollMessageComponent.handleChoose(index);
|
pollMessageComponent.handleChoose(index);
|
||||||
|
|
|
@ -285,10 +285,8 @@ SilicaFlickable {
|
||||||
: "../components/chatInformationPage/ChatInformationProfilePicture.qml"
|
: "../components/chatInformationPage/ChatInformationProfilePicture.qml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// PageHeader changes the html base path:
|
|
||||||
property url emojiBase: "../js/emoji/"
|
|
||||||
leftMargin: imageContainer.getEased((imageContainer.minDimension + Theme.paddingMedium), 0, imageContainer.tweenFactor) + Theme.horizontalPageMargin
|
leftMargin: imageContainer.getEased((imageContainer.minDimension + Theme.paddingMedium), 0, imageContainer.tweenFactor) + Theme.horizontalPageMargin
|
||||||
title: chatInformationPage.chatInformation.title !== "" ? Emoji.emojify(chatInformationPage.chatInformation.title, Theme.fontSizeLarge, emojiBase) : qsTr("Unknown")
|
title: chatInformationPage.chatInformation.title !== "" ? Emoji.emojify(chatInformationPage.chatInformation.title, Theme.fontSizeLarge) : qsTr("Unknown")
|
||||||
description: chatInformationPage.isPrivateChat ? ("@"+(chatInformationPage.privateChatUserInformation.username || chatInformationPage.chatPartnerGroupId)) : ""
|
description: chatInformationPage.isPrivateChat ? ("@"+(chatInformationPage.privateChatUserInformation.username || chatInformationPage.chatPartnerGroupId)) : ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,18 +77,18 @@ ChatInformationTabItemBase {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
// chat title
|
// chat title
|
||||||
primaryText.text: Emoji.emojify(Functions.getUserName(user), primaryText.font.pixelSize, "../js/emoji/")
|
primaryText.text: Emoji.emojify(Functions.getUserName(user), primaryText.font.pixelSize)
|
||||||
// last user
|
// last user
|
||||||
prologSecondaryText.text: "@"+(user.username !== "" ? user.username : user_id) + (user_id === chatInformationPage.myUserId ? " " + qsTr("You") : "")
|
prologSecondaryText.text: "@"+(user.username !== "" ? user.username : user_id) + (user_id === chatInformationPage.myUserId ? " " + qsTr("You") : "")
|
||||||
secondaryText {
|
secondaryText {
|
||||||
horizontalAlignment: Text.AlignRight
|
horizontalAlignment: Text.AlignRight
|
||||||
property string statusText: Functions.getChatMemberStatusText(model.status["@type"])
|
property string statusText: Functions.getChatMemberStatusText(model.status["@type"])
|
||||||
property string customText: model.status.custom_title ? Emoji.emojify(model.status.custom_title, secondaryText.font.pixelSize, "../js/emoji/") : ""
|
property string customText: model.status.custom_title ? Emoji.emojify(model.status.custom_title, secondaryText.font.pixelSize) : ""
|
||||||
text: (statusText !== "" && customText !== "") ? statusText + ", " + customText : statusText + customText
|
text: (statusText !== "" && customText !== "") ? statusText + ", " + customText : statusText + customText
|
||||||
}
|
}
|
||||||
tertiaryText {
|
tertiaryText {
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
text: user.type["@type"] === "userTypeBot" ? (Emoji.emojify("🤖 "+bot_info.description, tertiaryText.font.pixelSize, "../js/emoji/")) : Functions.getChatPartnerStatusText(user.status["@type"], user.status.was_online);
|
text: user.type["@type"] === "userTypeBot" ? (Emoji.emojify("🤖 "+bot_info.description, tertiaryText.font.pixelSize)) : Functions.getChatPartnerStatusText(user.status["@type"], user.status.was_online);
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ ChatInformationTabItemBase {
|
||||||
onChatChanged: {
|
onChatChanged: {
|
||||||
if (changedChatId === chat_id) {
|
if (changedChatId === chat_id) {
|
||||||
// Force update of some list item elements (currently only last message text seems to create problems). dataChanged() doesn't seem to trigger them all :(
|
// Force update of some list item elements (currently only last message text seems to create problems). dataChanged() doesn't seem to trigger them all :(
|
||||||
secondaryText.text = last_message_text ? Emoji.emojify(Functions.enhanceHtmlEntities(last_message_text), Theme.fontSizeExtraSmall, "../../js/emoji/") : qsTr("Unknown")
|
secondaryText.text = last_message_text ? Emoji.emojify(Functions.enhanceHtmlEntities(last_message_text), Theme.fontSizeExtraSmall) : qsTr("Unknown")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ Column {
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
textFormat: Text.StyledText
|
textFormat: Text.StyledText
|
||||||
color: Theme.primaryColor
|
color: Theme.primaryColor
|
||||||
text: Emoji.emojify( Functions.replaceUrlsWithLinks(textItem.text).replace(/\n/g, "<br>"), Theme.fontSizeExtraSmall, "../../js/emoji/")
|
text: Emoji.emojify( Functions.replaceUrlsWithLinks(textItem.text).replace(/\n/g, "<br>"), Theme.fontSizeExtraSmall)
|
||||||
linkColor: Theme.highlightColor
|
linkColor: Theme.highlightColor
|
||||||
visible: text !== ""
|
visible: text !== ""
|
||||||
onLinkActivated: {
|
onLinkActivated: {
|
||||||
|
|
Loading…
Reference in a new issue