Support changing the nick by clicking it in MessageInput
This commit is contained in:
parent
4a74463ae8
commit
f174d98107
16 changed files with 335 additions and 134 deletions
|
@ -36,6 +36,16 @@ export default class Chat extends Component {
|
|||
setServerName(title, tab.server);
|
||||
};
|
||||
|
||||
handleNickChange = nick => {
|
||||
const { setNick, tab } = this.props;
|
||||
setNick(nick, tab.server, true);
|
||||
};
|
||||
|
||||
handleNickEditDone = nick => {
|
||||
const { setNick, tab } = this.props;
|
||||
setNick(nick, tab.server);
|
||||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
channel,
|
||||
|
@ -96,6 +106,8 @@ export default class Chat extends Component {
|
|||
tab={tab}
|
||||
onCommand={runCommand}
|
||||
onMessage={sendMessage}
|
||||
onNickChange={this.handleNickChange}
|
||||
onNickEditDone={this.handleNickEditDone}
|
||||
{...inputActions}
|
||||
/>
|
||||
<UserList
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue