Added limited local read/unread tracking
This commit is contained in:
@@ -44,23 +44,23 @@ HTileDelegate {
|
||||
color: theme.mainPane.listView.room.name
|
||||
}
|
||||
|
||||
// HLabel {
|
||||
// text: model.mentions
|
||||
// font.pixelSize: theme.fontSize.small
|
||||
// verticalAlignment: Qt.AlignVCenter
|
||||
// leftPadding: theme.spacing / 4
|
||||
// rightPadding: leftPadding
|
||||
HLabel {
|
||||
text: model.unreads
|
||||
font.pixelSize: theme.fontSize.small
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
leftPadding: theme.spacing / 4
|
||||
rightPadding: leftPadding
|
||||
|
||||
// scale: model.mentions === 0 ? 0 : 1
|
||||
// visible: scale > 0
|
||||
scale: model.unreads === 0 ? 0 : 1
|
||||
visible: scale > 0
|
||||
|
||||
// background: Rectangle {
|
||||
// color: theme.colors.alertBackground
|
||||
// radius: theme.radius / 4
|
||||
// }
|
||||
background: Rectangle {
|
||||
color: model.mentions === 0 ? theme.colors.unreadBackground : theme.colors.alertBackground
|
||||
radius: theme.radius / 4
|
||||
}
|
||||
|
||||
// Behavior on scale { HNumberAnimation {} }
|
||||
// },
|
||||
Behavior on scale { HNumberAnimation {} }
|
||||
}
|
||||
|
||||
HIcon {
|
||||
svgName: "invite-received"
|
||||
|
@@ -61,6 +61,8 @@ HLoader {
|
||||
function showRoom(userId, roomId) {
|
||||
_show("Pages/Chat/Chat.qml", {userId, roomId})
|
||||
|
||||
py.callClientCoro(userId, "room_read", [roomId], () => {})
|
||||
|
||||
window.uiState.page = "Pages/Chat/Chat.qml"
|
||||
window.uiState.pageProperties = {userId, roomId}
|
||||
window.uiStateChanged()
|
||||
|
Reference in New Issue
Block a user