Put an action behind new message count circle, fixes #13
This commit is contained in:
parent
266dd12570
commit
ea123b08ea
2 changed files with 27 additions and 17 deletions
|
@ -48,6 +48,7 @@ Item {
|
|||
if (typeof photoData === "object") {
|
||||
if (photoData.local.is_downloading_completed) {
|
||||
profileImageLoader.active = true;
|
||||
replacementThumbnailItem.visible = false;
|
||||
} else {
|
||||
tdLibWrapper.downloadFile(photoData.id);
|
||||
}
|
||||
|
@ -83,6 +84,7 @@ Item {
|
|||
if (fileInformation.local.is_downloading_completed) {
|
||||
photoData = fileInformation;
|
||||
profileImageLoader.active = true;
|
||||
replacementThumbnailItem.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +146,7 @@ Item {
|
|||
id: replacementThumbnailItem
|
||||
width: parent.width - Theme.paddingSmall
|
||||
height: parent.height - Theme.paddingSmall
|
||||
//visible: singleImage.status !== Image.Ready
|
||||
visible: !profileImageLoader.active
|
||||
visible: true
|
||||
|
||||
Rectangle {
|
||||
id: replacementThumbnailBackground
|
||||
|
|
|
@ -731,15 +731,18 @@ Page {
|
|||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: chatUnreadMessagesCountBackground
|
||||
color: Theme.highlightBackgroundColor
|
||||
Item {
|
||||
id: chatUnreadMessagesItem
|
||||
width: Theme.fontSizeHuge
|
||||
height: Theme.fontSizeHuge
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: Theme.paddingMedium
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: Theme.paddingMedium
|
||||
Rectangle {
|
||||
id: chatUnreadMessagesCountBackground
|
||||
color: Theme.highlightBackgroundColor
|
||||
anchors.fill: parent
|
||||
radius: width / 2
|
||||
visible: !chatPage.loading && chatInformation.unread_count > 0
|
||||
}
|
||||
|
@ -753,7 +756,13 @@ Page {
|
|||
visible: chatUnreadMessagesCountBackground.visible
|
||||
text: chatInformation.unread_count > 99 ? "99+" : chatInformation.unread_count
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
chatView.positionViewAtIndex(chatView.count - 1 - chatInformation.unread_count, ListView.Beginning);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
|
|
Loading…
Reference in a new issue