From 5498bdf3bf6474a35f89d86bc2bec0cd07023d4a Mon Sep 17 00:00:00 2001 From: Ben Bucksch Date: Thu, 19 Dec 2024 09:17:04 +0100 Subject: [PATCH] Mail: Msg display: Mark read only when unread; send error to account --- app/frontend/Mail/Message/MessageHeader.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/frontend/Mail/Message/MessageHeader.svelte b/app/frontend/Mail/Message/MessageHeader.svelte index 3a5aa0c4..1413f27c 100644 --- a/app/frontend/Mail/Message/MessageHeader.svelte +++ b/app/frontend/Mail/Message/MessageHeader.svelte @@ -102,6 +102,9 @@ $: catchErrors(() => markMessageAsRead(message, readDelay), backgroundError); let readTimeout: NodeJS.Timeout; function markMessageAsRead(message: EMail, readDelay: number) { + if (message.isRead) { + return; + } if (readDelay < 0) { return; } @@ -110,7 +113,8 @@ } clearTimeout(readTimeout); readTimeout = setTimeout(() => { - message.markRead(true).catch(backgroundError); + message.markRead(true) + .catch(message.folder.account.errorCallback); }, readDelay * 1000); } onDestroy(() => {