aboutsummaryrefslogtreecommitdiff
path: root/qml/Message.qml
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-03-18 01:10:03 +0300
committerlink2xt <link2xt@testrun.org>2021-03-19 03:13:33 +0300
commita72bec0f11e4d794b04bd9c272dbf2997294333b (patch)
tree1e273616239c4cb7815121a0eaa27a7c3f8f1f67 /qml/Message.qml
parent99ece5f196422d0028b03f17244d643ffd7fc976 (diff)
downloadkdeltachat-a72bec0f11e4d794b04bd9c272dbf2997294333b.tar.gz
kdeltachat-a72bec0f11e4d794b04bd9c272dbf2997294333b.zip
Do not try to mark outgoing and seen messages as seen
Diffstat (limited to 'qml/Message.qml')
-rw-r--r--qml/Message.qml6
1 files changed, 5 insertions, 1 deletions
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 {