Remember last used nick and realname, closes #43
This commit is contained in:
parent
35727fb2b8
commit
99b3ff519b
File diff suppressed because one or more lines are too long
@ -168,11 +168,11 @@ export default withFormik({
|
||||
name: query.name || defaults.name,
|
||||
host: query.host || defaults.host,
|
||||
port,
|
||||
nick: query.nick || '',
|
||||
nick: query.nick || localStorage.lastNick || '',
|
||||
channels: channels || defaults.channels.join(','),
|
||||
username: query.username || '',
|
||||
password: defaults.password ? ' ' : '',
|
||||
realname: query.realname || '',
|
||||
realname: query.realname || localStorage.lastRealname || '',
|
||||
tls: ssl
|
||||
};
|
||||
},
|
||||
@ -228,5 +228,10 @@ export default withFormik({
|
||||
if (channels.length > 0) {
|
||||
join(channels, values.host);
|
||||
}
|
||||
|
||||
localStorage.lastNick = values.nick;
|
||||
if (values.realname) {
|
||||
localStorage.lastRealname = values.realname;
|
||||
}
|
||||
}
|
||||
})(Connect);
|
||||
|
Loading…
Reference in New Issue
Block a user