mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-28 10:16:40 -05:00
Don't show unread marker for outgoing messages
Closes: https://todo.sr.ht/~emersion/gamja/100
This commit is contained in:
parent
c65ecd66eb
commit
c428e504fe
1 changed files with 9 additions and 1 deletions
|
@ -469,17 +469,25 @@ export default class App extends Component {
|
|||
this.setBufferState(bufID, (buf) => {
|
||||
// TODO: set unread if scrolled up
|
||||
let unread = buf.unread;
|
||||
let prevReadReceipt = buf.prevReadReceipt;
|
||||
|
||||
if (this.state.activeBuffer !== buf.id) {
|
||||
unread = Unread.union(unread, msgUnread);
|
||||
} else {
|
||||
this.setReceipt(bufName, ReceiptType.READ, msg);
|
||||
}
|
||||
|
||||
// Don't show unread marker for my own messages
|
||||
if (client.isMyNick(msg.prefix.name)) {
|
||||
prevReadReceipt = { time: msg.tags.time };
|
||||
}
|
||||
|
||||
this.bufferStore.put({
|
||||
name: buf.name,
|
||||
server: client.params,
|
||||
unread,
|
||||
});
|
||||
return { unread };
|
||||
return { unread, prevReadReceipt };
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue