Chat List: Muted icon now always visible, fixes #156
This commit is contained in:
parent
a06f384e1a
commit
1523d62362
2 changed files with 17 additions and 4 deletions
|
@ -15,7 +15,7 @@ PhotoTextsListItem {
|
||||||
property string previewText: showDraft ? draft_message_text : last_message_text
|
property string previewText: showDraft ? draft_message_text : last_message_text
|
||||||
|
|
||||||
// chat title
|
// chat title
|
||||||
primaryText.text: title ? Emoji.emojify(title + ( display.notification_settings.mute_for > 0 ? " 🔇" : "" ), Theme.fontSizeMedium) : qsTr("Unknown")
|
primaryText.text: title ? Emoji.emojify(title, Theme.fontSizeMedium) : qsTr("Unknown")
|
||||||
// last user
|
// last user
|
||||||
prologSecondaryText.text: showDraft ? "<i>"+qsTr("Draft")+"</i>" : (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") ) : "" ))
|
prologSecondaryText.text: showDraft ? "<i>"+qsTr("Draft")+"</i>" : (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") ) : "" ))
|
||||||
// last message
|
// last message
|
||||||
|
@ -26,6 +26,7 @@ PhotoTextsListItem {
|
||||||
isSecret: ( chat_type === TelegramAPI.ChatTypeSecret )
|
isSecret: ( chat_type === TelegramAPI.ChatTypeSecret )
|
||||||
isMarkedAsUnread: is_marked_as_unread
|
isMarkedAsUnread: is_marked_as_unread
|
||||||
isPinned: is_pinned
|
isPinned: is_pinned
|
||||||
|
isMuted: display.notification_settings.mute_for > 0
|
||||||
|
|
||||||
openMenuOnPressAndHold: true//chat_id != overviewPage.ownUserId
|
openMenuOnPressAndHold: true//chat_id != overviewPage.ownUserId
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ ListItem {
|
||||||
property bool isVerified: false
|
property bool isVerified: false
|
||||||
property bool isMarkedAsUnread: false
|
property bool isMarkedAsUnread: false
|
||||||
property bool isPinned: false
|
property bool isPinned: false
|
||||||
|
property bool isMuted: false
|
||||||
property alias pictureThumbnail: pictureThumbnail
|
property alias pictureThumbnail: pictureThumbnail
|
||||||
|
|
||||||
contentHeight: mainRow.height + separator.height + 2 * Theme.paddingMedium
|
contentHeight: mainRow.height + separator.height + 2 * Theme.paddingMedium
|
||||||
|
@ -125,15 +126,26 @@ ListItem {
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeMedium
|
||||||
truncationMode: TruncationMode.Fade
|
truncationMode: TruncationMode.Fade
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
width: Math.min(contentColumn.width - (verifiedImage.visible ? (verifiedImage.width + primaryTextRow.spacing) : 0), implicitWidth)
|
width: Math.min(contentColumn.width - (verifiedImage.visible ? (verifiedImage.width + primaryTextRow.spacing) : 0) - (mutedImage.visible ? (mutedImage.width + primaryTextRow.spacing) : 0), implicitWidth)
|
||||||
}
|
}
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
id: verifiedImage
|
id: verifiedImage
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
source: chatListViewItem.isVerified ? "../../images/icon-verified.svg" : ""
|
source: chatListViewItem.isVerified ? "../../images/icon-verified.svg" : ""
|
||||||
sourceSize.width: Theme.iconSizeExtraSmall
|
sourceSize: Qt.size(Theme.iconSizeExtraSmall, Theme.iconSizeExtraSmall)
|
||||||
width: Theme.iconSizeExtraSmall
|
width: Theme.iconSizeSmall
|
||||||
|
height: Theme.iconSizeSmall
|
||||||
|
visible: status === Image.Ready
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: mutedImage
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
source: chatListViewItem.isMuted ? "../js/emoji/1f507.svg" : ""
|
||||||
|
sourceSize: Qt.size(Theme.iconSizeExtraSmall, Theme.iconSizeExtraSmall)
|
||||||
|
width: Theme.iconSizeSmall
|
||||||
|
height: Theme.iconSizeSmall
|
||||||
visible: status === Image.Ready
|
visible: status === Image.Ready
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue