diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-30 04:54:03 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-12-30 04:54:03 +0100 |
commit | 9a9dbda571a674ecfbf23533c64ec9cb095479ef (patch) | |
tree | 3e4ac7250ec9bedc7285c5aec144eb496a08e62e /resources/qml/MessageView.qml | |
parent | Convert blurhash image format on worker thread (diff) | |
download | nheko-9a9dbda571a674ecfbf23533c64ec9cb095479ef.tar.xz |
Update presence dynamically and reduce allocations
Diffstat (limited to 'resources/qml/MessageView.qml')
-rw-r--r-- | resources/qml/MessageView.qml | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/resources/qml/MessageView.qml b/resources/qml/MessageView.qml index 62f7735b..adbc9d70 100644 --- a/resources/qml/MessageView.qml +++ b/resources/qml/MessageView.qml @@ -329,12 +329,21 @@ ScrollView { } Label { + id: statusMsg color: Nheko.colors.buttonText - text: TimelineManager.userStatus(userId) + text: Presence.userStatus(userId) textFormat: Text.PlainText elide: Text.ElideRight width: chat.delegateMaxWidth - parent.spacing * 2 - userName.implicitWidth - Nheko.avatarSize font.italic: true + + Connections { + target: Presence + + function onPresenceChanged(id) { + if (id == userId) statusMsg.text = Presence.userStatus(userId); + } + } } } |