Chat Information Page: More tweaks
This commit is contained in:
parent
5ee71dda29
commit
179ef885b5
4 changed files with 11 additions and 10 deletions
|
@ -12,13 +12,14 @@ PhotoTextsListItem {
|
|||
// replacementStringHint: primaryText.text
|
||||
}
|
||||
property int ownUserId
|
||||
property url emojiBase: "../js/emoji/"
|
||||
|
||||
// chat title
|
||||
primaryText.text: title ? Emoji.emojify(title, Theme.fontSizeMedium) + ( display.notification_settings.mute_for > 0 ? Emoji.emojify(" 🔇", Theme.fontSizeMedium) : "" ) : qsTr("Unknown")
|
||||
primaryText.text: title ? Emoji.emojify(title, Theme.fontSizeMedium, emojiBase) + ( display.notification_settings.mute_for > 0 ? Emoji.emojify(" 🔇", 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(last_message_text, Theme.fontSizeExtraSmall) : qsTr("Unknown")
|
||||
secondaryText.text: last_message_text ? Emoji.emojify(last_message_text, Theme.fontSizeExtraSmall, emojiBase) : qsTr("Unknown")
|
||||
// message date
|
||||
tertiaryText.text: last_message_date ? Functions.getDateTimeElapsed(last_message_date) : qsTr("Unknown")
|
||||
unreadCount: unread_count
|
||||
|
|
|
@ -39,7 +39,6 @@ Column {
|
|||
|
||||
SectionHeader {
|
||||
id: editAreaHeader
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
height: parent.visible && text !== "" ? Theme.itemSizeExtraSmall : 0
|
||||
x: 0
|
||||
}
|
||||
|
|
|
@ -79,18 +79,18 @@ ChatInformationTabItemBase {
|
|||
width: parent.width
|
||||
|
||||
// chat title isPrivateChat ? () :
|
||||
primaryText.text: Emoji.emojify(Functions.getUserName(user), primaryText.font.pixelSize, "../../js/emoji/")
|
||||
primaryText.text: Emoji.emojify(Functions.getUserName(user), primaryText.font.pixelSize, "../js/emoji/")
|
||||
// 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, "../js/emoji/") : ""
|
||||
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, "../js/emoji/")) : Functions.getChatPartnerStatusText(user.status["@type"], user.status.was_online);
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
|
|
|
@ -47,11 +47,11 @@ Column {
|
|||
id: labelComponent
|
||||
Label {
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
textFormat: Text.StyledText
|
||||
color: Theme.highlightColor
|
||||
color: Theme.primaryColor
|
||||
text: Emoji.emojify( Functions.replaceUrlsWithLinks(textItem.text).replace(/\n/g, "<br>"), Theme.fontSizeExtraSmall, "../../js/emoji/")
|
||||
linkColor: Theme.primaryColor
|
||||
linkColor: Theme.highlightColor
|
||||
visible: text !== ""
|
||||
onLinkActivated: {
|
||||
Functions.handleLink(link);
|
||||
|
@ -62,8 +62,9 @@ Column {
|
|||
id: linkedLabelComponent
|
||||
LinkedLabel {
|
||||
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
|
||||
font.pixelSize: Theme.fontSizeExtraSmall
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
textFormat: Text.StyledText
|
||||
color: Theme.highlightColor
|
||||
plainText: textItem.text
|
||||
visible: textItem.text !== ""
|
||||
onLinkActivated: {
|
||||
|
|
Loading…
Reference in a new issue