fix unread count: sent messages don't count as unread
Track outgoing messages separately (own counter) so they appear in the log but don't inflate unread counts. Reset on recv. Co-Developed-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
e104a16f61
commit
53a2dbac37
3 changed files with 22 additions and 5 deletions
|
|
@ -544,7 +544,10 @@ impl channel_server::Server for ChannelServerImpl {
|
|||
} else {
|
||||
format!("[PM:{}] {}", target, message)
|
||||
};
|
||||
state.borrow_mut().push_message(log_line, 0, &channel);
|
||||
state.borrow_mut().channel_logs
|
||||
.entry(channel.clone())
|
||||
.or_insert_with(ChannelLog::new)
|
||||
.push_own(log_line);
|
||||
|
||||
Ok(())
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue