From 73a2bcab947f428a553434ea2189324a30c8044d Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 25 Aug 2021 08:47:35 +0200 Subject: [PATCH] Update buffer store when marking all buffers as read --- keybindings.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/keybindings.js b/keybindings.js index 0c99ae5..655bf42 100644 --- a/keybindings.js +++ b/keybindings.js @@ -23,9 +23,18 @@ export const keybindings = [ let lastMsg = buf.messages[buf.messages.length - 1]; app.setReceipt(buf.name, ReceiptType.READ, lastMsg); } + buffers.set(buf.id, { ...buf, unread: Unread.NONE, + prevReadReceipt: null, + }); + + let client = app.clients.get(buf.server); + app.bufferStore.put({ + name: buf.name, + server: client.params, + unread: Unread.NONE, }); }); return { buffers };