Use buffer ID in BufferItem.onBufferClick
This commit is contained in:
parent
0e078932c0
commit
bfc0960200
2 changed files with 3 additions and 3 deletions
|
@ -821,8 +821,8 @@ export default class App extends Component {
|
||||||
this.privmsg(buf.name, text);
|
this.privmsg(buf.name, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleBufferListClick(name) {
|
handleBufferListClick(id) {
|
||||||
this.switchBuffer({ name });
|
this.switchBuffer(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleJoinClick(event) {
|
handleJoinClick(event) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ export default function BufferList(props) {
|
||||||
return html`
|
return html`
|
||||||
<ul>
|
<ul>
|
||||||
${Array.from(props.buffers.values()).map((buf) => html`
|
${Array.from(props.buffers.values()).map((buf) => html`
|
||||||
<${BufferItem} key=${buf.id} buffer=${buf} network=${props.networks.get(buf.network)} onClick=${() => props.onBufferClick(buf.name)} active=${props.activeBuffer == buf.id}/>
|
<${BufferItem} key=${buf.id} buffer=${buf} network=${props.networks.get(buf.network)} onClick=${() => props.onBufferClick(buf)} active=${props.activeBuffer == buf.id}/>
|
||||||
`)}
|
`)}
|
||||||
</ul>
|
</ul>
|
||||||
`;
|
`;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue