mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-12-02 20:17:14 -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) => {
|
this.setBufferState(bufID, (buf) => {
|
||||||
// TODO: set unread if scrolled up
|
// TODO: set unread if scrolled up
|
||||||
let unread = buf.unread;
|
let unread = buf.unread;
|
||||||
|
let prevReadReceipt = buf.prevReadReceipt;
|
||||||
|
|
||||||
if (this.state.activeBuffer !== buf.id) {
|
if (this.state.activeBuffer !== buf.id) {
|
||||||
unread = Unread.union(unread, msgUnread);
|
unread = Unread.union(unread, msgUnread);
|
||||||
} else {
|
} else {
|
||||||
this.setReceipt(bufName, ReceiptType.READ, msg);
|
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({
|
this.bufferStore.put({
|
||||||
name: buf.name,
|
name: buf.name,
|
||||||
server: client.params,
|
server: client.params,
|
||||||
unread,
|
unread,
|
||||||
});
|
});
|
||||||
return { unread };
|
return { unread, prevReadReceipt };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue