Change handling of Integrity button in State

This commit is contained in:
Maroxy 2022-02-20 11:13:18 +01:00
parent 4cd514457c
commit 6be07994cc
No known key found for this signature in database
GPG key ID: F4B27EADB21E3021

View file

@ -103,16 +103,10 @@ export default class State
this.integrityButton.style['display'] = 'none';
this.settingsButton.style['display'] = 'none';
// We must specify this files here directly
// because otherwise Vite will not bundle 'em
const integrityModule = import('./states/CheckIntegrity');
(this._state === 'game-launch-available' ? integrityModule : null!)
.then((module) => {
import('./states/CheckIntegrity').then((module) => {
module.default(this.launcher).then(() => {
this.update().then(() => {
this.launchButton.style['display'] = 'block';
this.integrityButton.style['display'] = 'block';
this.settingsButton.style['display'] = 'block';
});
});