mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
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);
|
||||
}
|
||||
|
||||
handleBufferListClick(name) {
|
||||
this.switchBuffer({ name });
|
||||
handleBufferListClick(id) {
|
||||
this.switchBuffer(id);
|
||||
}
|
||||
|
||||
handleJoinClick(event) {
|
||||
|
|
|
@ -49,7 +49,7 @@ export default function BufferList(props) {
|
|||
return html`
|
||||
<ul>
|
||||
${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>
|
||||
`;
|
||||
|
|
Loading…
Reference in a new issue