mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
components/app: switch off loading state atomically
Set connectParams together with loading, to avoid intermediate state where loading = false but connectParams isn't set yet.
This commit is contained in:
parent
4964782c30
commit
84b68308b9
1 changed files with 1 additions and 3 deletions
|
@ -250,8 +250,6 @@ export default class App extends Component {
|
|||
* done in fillConnectParams)
|
||||
*/
|
||||
handleConfig(config) {
|
||||
this.setState({ loading: false });
|
||||
|
||||
let connectParams = { ...this.state.connectParams };
|
||||
|
||||
if (typeof config.server.url === "string") {
|
||||
|
@ -341,7 +339,7 @@ export default class App extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
this.setState({ connectParams: connectParams });
|
||||
this.setState({ loading: false, connectParams: connectParams });
|
||||
|
||||
if (connectParams.autoconnect) {
|
||||
this.setState({ connectForm: false });
|
||||
|
|
Loading…
Reference in a new issue