diff --git a/components/app.js b/components/app.js index 0c7d98e..0359ed1 100644 --- a/components/app.js +++ b/components/app.js @@ -467,19 +467,17 @@ export default class App extends Component { this.setBufferState(bufID, (buf) => { // TODO: set unread if scrolled up let unread = buf.unread; - let lastReadReceipt = buf.lastReadReceipt; if (this.state.activeBuffer !== buf.id) { unread = Unread.union(unread, msgUnread); } else { this.setReceipt(bufName, ReceiptType.READ, msg); - lastReadReceipt = this.getReceipt(bufName, ReceiptType.READ); } this.bufferStore.put({ name: buf.name, server: client.params, unread, }); - return { unread, lastReadReceipt }; + return { unread }; }); } diff --git a/state.js b/state.js index ab7ccbe..fd67043 100644 --- a/state.js +++ b/state.js @@ -275,6 +275,7 @@ export const State = { offline: false, // if nick messages: [], unread: Unread.NONE, + lastReadReceipt: null, }); bufferList = bufferList.sort(compareBuffers); let buffers = new Map(bufferList.map((buf) => [buf.id, buf]));