Introduce per-server user map

This allows us to store information about users in a signle place,
instead of putting it in user buffers. This is required to display
metadata about users in the channel members list.
This commit is contained in:
Simon Ser 2021-09-21 13:33:15 +02:00
parent e7f8620933
commit c66ce61029
3 changed files with 49 additions and 40 deletions

View file

@ -1234,11 +1234,17 @@ export default class App extends Component {
let bufferHeader = null;
if (activeBuffer) {
let activeUser = null;
if (activeBuffer.type == BufferType.NICK) {
activeUser = activeServer.users.get(activeBuffer.name);
}
bufferHeader = html`
<section id="buffer-header">
<${BufferHeader}
buffer=${activeBuffer}
server=${activeServer}
user=${activeUser}
isBouncer=${isBouncer}
bouncerNetwork=${activeBouncerNetwork}
onChannelClick=${this.handleChannelClick}