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 || ({})
|
||||
}
|
||||
property int ownUserId
|
||||
property url emojiBase: "../js/emoji/"
|
||||
|
||||
// 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
|
||||
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
|
||||
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
|
||||
tertiaryText.text: ( last_message_date ? Functions.getDateTimeElapsed(last_message_date) : qsTr("Unknown") ) + Emoji.emojify(last_message_status, tertiaryText.font.pixelSize)
|
||||
unreadCount: unread_count
|
||||
|
|
|
@ -106,11 +106,9 @@ Item {
|
|||
id: canAnswerDelegate
|
||||
TextSwitch {
|
||||
id: optionDelegate
|
||||
// TextSwitch changes the html base path:
|
||||
property url emojiBase: "../js/emoji/"
|
||||
width: pollMessageComponent.width
|
||||
automaticCheck: false
|
||||
text: Emoji.emojify(modelData.text, Theme.fontSizeMedium, emojiBase)
|
||||
text: Emoji.emojify(modelData.text, Theme.fontSizeMedium)
|
||||
checked: pollMessageComponent.chosenIndexes.indexOf(index) > -1
|
||||
onClicked: {
|
||||
pollMessageComponent.handleChoose(index);
|
||||
|
|
|
@ -285,10 +285,8 @@ SilicaFlickable {
|
|||
: "../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
|
||||
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)) : ""
|
||||
}
|
||||
|
||||
|
|
|
@ -77,18 +77,18 @@ ChatInformationTabItemBase {
|
|||
width: parent.width
|
||||
|
||||
// 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
|
||||
prologSecondaryText.text: "@"+(user.username !== "" ? user.username : user_id) + (user_id === chatInformationPage.myUserId ? " " + qsTr("You") : "")
|
||||
secondaryText {
|
||||
horizontalAlignment: Text.AlignRight
|
||||
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
|
||||
}
|
||||
tertiaryText {
|
||||
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
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ ChatInformationTabItemBase {
|
|||
onChatChanged: {
|
||||
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 :(
|
||||
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
|
||||
textFormat: Text.StyledText
|
||||
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
|
||||
visible: text !== ""
|
||||
onLinkActivated: {
|
||||
|
|
Loading…
Reference in a new issue