From 525df515bc916dfa26975377d2a12775c76d32a2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 2 Mar 2021 21:29:13 +0100 Subject: [PATCH] Fix messages in current buffer not marked as read --- components/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/app.js b/components/app.js index affaf5f..c62a08d 100644 --- a/components/app.js +++ b/components/app.js @@ -418,11 +418,11 @@ export default class App extends Component { this.setReceipt(bufName, ReceiptType.DELIVERED, msg); - this.setBufferState({ network: netID, name: bufName}, (buf, state) => { + this.setBufferState({ network: netID, name: bufName}, (buf) => { // TODO: set unread if scrolled up var unread = buf.unread; var lastReadReceipt = buf.lastReadReceipt; - if (state.activeBuffer != buf.id) { + if (this.state.activeBuffer != buf.id) { unread = Unread.union(unread, msgUnread); } else { this.setReceipt(bufName, ReceiptType.READ, msg);