mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-15 08:53:30 +01:00
Nuke DEFAULT_NETWORK
This commit is contained in:
parent
6cb2dd59de
commit
4acacc1f22
@ -163,6 +163,7 @@ export default class App extends Component {
|
|||||||
buffer = createRef();
|
buffer = createRef();
|
||||||
composer = createRef();
|
composer = createRef();
|
||||||
reconnectTimeoutID = null;
|
reconnectTimeoutID = null;
|
||||||
|
lastNetworkID = 0;
|
||||||
lastBufferID = 0;
|
lastBufferID = 0;
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@ -437,7 +438,12 @@ export default class App extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
connect(netID, params) {
|
connect(netID, params) {
|
||||||
this.disconnect(netID);
|
if (netID) {
|
||||||
|
this.disconnect(netID);
|
||||||
|
} else {
|
||||||
|
this.lastNetworkID++;
|
||||||
|
netID = this.lastNetworkID;
|
||||||
|
}
|
||||||
|
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
var networks = new Map(state.networks);
|
var networks = new Map(state.networks);
|
||||||
@ -725,7 +731,7 @@ export default class App extends Component {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.connect(DEFAULT_NETWORK, connectParams);
|
this.connect(null, connectParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
handleNickClick(nick) {
|
handleNickClick(nick) {
|
||||||
@ -961,7 +967,7 @@ export default class App extends Component {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (this.state.connectParams.autoconnect) {
|
if (this.state.connectParams.autoconnect) {
|
||||||
this.connect(DEFAULT_NETWORK, this.state.connectParams);
|
this.connect(null, this.state.connectParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
setupKeybindings(this);
|
setupKeybindings(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user