From a72bec0f11e4d794b04bd9c272dbf2997294333b Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 18 Mar 2021 01:10:03 +0300 Subject: Do not try to mark outgoing and seen messages as seen --- qml/Message.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qml/Message.qml') diff --git a/qml/Message.qml b/qml/Message.qml index 5d535f4..492c5cb 100644 --- a/qml/Message.qml +++ b/qml/Message.qml @@ -27,7 +27,11 @@ RowLayout { : "" Component.onCompleted: { - messageObject.context.markseenMsgs([messageObject.message.id]) + // Only try to mark fresh and noticed messages as seen to + // avoid unnecessary database calls when viewing an already read chat. + if ([10, 13].includes(messageObject.message.state)) { + messageObject.context.markseenMsgs([messageObject.message.id]) + } } Rectangle { -- cgit v1.2.3-70-g09d2