Skip to content

Commit

Permalink
Mail: Msg display: Mark read only when unread; send error to account
Browse files Browse the repository at this point in the history
  • Loading branch information
benbucksch committed Dec 19, 2024
1 parent b9ef294 commit 5498bdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/frontend/Mail/Message/MessageHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -110,7 +113,8 @@
}
clearTimeout(readTimeout);
readTimeout = setTimeout(() => {
message.markRead(true).catch(backgroundError);
message.markRead(true)
.catch(message.folder.account.errorCallback);
}, readDelay * 1000);
}
onDestroy(() => {
Expand Down

0 comments on commit 5498bdf

Please sign in to comment.