Split loading & connecting messages
This commit is contained in:
@@ -60,6 +60,7 @@ class App extends Component {
|
|||||||
);
|
);
|
||||||
// Try to connect to camera at startup.
|
// Try to connect to camera at startup.
|
||||||
// If none is found among saved connections, it will fallback to a picker.
|
// If none is found among saved connections, it will fallback to a picker.
|
||||||
|
this.setState({ type: 'Status', message: '⌛ Loading...' });
|
||||||
this.tryToConnectToCamera();
|
this.tryToConnectToCamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,11 +74,11 @@ class App extends Component {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
this.setState({ type: 'Status', message: '⌛ Connecting...' });
|
||||||
await this.tryToConnectToCamera();
|
await this.tryToConnectToCamera();
|
||||||
};
|
};
|
||||||
|
|
||||||
async tryToConnectToCamera() {
|
async tryToConnectToCamera() {
|
||||||
this.setState({ type: 'Status', message: 'Connecting...' });
|
|
||||||
try {
|
try {
|
||||||
this.connection = await connect();
|
this.connection = await connect();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user