mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-24 02:27:37 +00:00
Add a note about timeout length
This commit is contained in:
parent
e0e06ce7a0
commit
fd435672db
1 changed files with 10 additions and 6 deletions
|
|
@ -61,12 +61,16 @@ class WebampComponent extends React.Component {
|
|||
|
||||
this._disposable.add(this._webamp.onClose(this.props.closeModal));
|
||||
|
||||
const renderTimeout = setTimeout(async () => {
|
||||
await this._webamp.renderWhenReady(this._ref);
|
||||
if (!this._unmounted) {
|
||||
this.props.loaded();
|
||||
}
|
||||
}, 500);
|
||||
const renderTimeout = setTimeout(
|
||||
async () => {
|
||||
await this._webamp.renderWhenReady(this._ref);
|
||||
if (!this._unmounted) {
|
||||
this.props.loaded();
|
||||
}
|
||||
},
|
||||
// This number must be higher than the transition time of the CSS animation that puts this in place.
|
||||
500
|
||||
);
|
||||
this._disposable.add(() => {
|
||||
clearTimeout(renderTimeout);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue