|
9 | 9 | RefreshOptions,
|
10 | 10 | Runner,
|
11 | 11 | WineVersionInfo,
|
12 |
| - InstallParams, |
13 | 12 | LibraryTopSectionOptions,
|
14 | 13 | ExperimentalFeatures
|
15 | 14 | } from 'common/types'
|
@@ -773,44 +772,37 @@ class GlobalState extends PureComponent<Props> {
|
773 | 772 | }
|
774 | 773 | )
|
775 | 774 |
|
776 |
| - window.api.handleInstallGame( |
777 |
| - async (e: IpcRendererEvent, args: InstallParams) => { |
778 |
| - const currentApp = libraryStatus.filter( |
779 |
| - (game) => game.appName === appName |
780 |
| - )[0] |
781 |
| - const { appName, runner } = args |
782 |
| - if (!currentApp || (currentApp && currentApp.status !== 'installing')) { |
783 |
| - const gameInfo = await getGameInfo(appName, runner) |
784 |
| - if (!gameInfo || gameInfo.runner === 'sideload') { |
785 |
| - return |
786 |
| - } |
787 |
| - return this.setState({ |
788 |
| - showInstallModal: { |
789 |
| - show: true, |
790 |
| - appName, |
791 |
| - runner, |
792 |
| - gameInfo |
793 |
| - } |
794 |
| - }) |
| 775 | + window.api.handleInstallGame(async (e, appName, runner) => { |
| 776 | + const currentApp = libraryStatus.filter( |
| 777 | + (game) => game.appName === appName |
| 778 | + )[0] |
| 779 | + if (!currentApp || (currentApp && currentApp.status !== 'installing')) { |
| 780 | + const gameInfo = await getGameInfo(appName, runner) |
| 781 | + if (!gameInfo || gameInfo.runner === 'sideload') { |
| 782 | + return |
795 | 783 | }
|
| 784 | + return this.setState({ |
| 785 | + showInstallModal: { |
| 786 | + show: true, |
| 787 | + appName, |
| 788 | + runner, |
| 789 | + gameInfo |
| 790 | + } |
| 791 | + }) |
796 | 792 | }
|
797 |
| - ) |
| 793 | + }) |
798 | 794 |
|
799 |
| - window.api.handleGameStatus( |
800 |
| - async (e: IpcRendererEvent, args: GameStatus) => { |
801 |
| - return this.handleGameStatus({ ...args }) |
802 |
| - } |
803 |
| - ) |
| 795 | + window.api.handleGameStatus((e, args) => { |
| 796 | + this.handleGameStatus({ ...args }) |
| 797 | + }) |
804 | 798 |
|
805 |
| - window.api.handleRefreshLibrary( |
806 |
| - async (e: IpcRendererEvent, runner: Runner) => { |
807 |
| - this.refreshLibrary({ |
808 |
| - checkForUpdates: false, |
809 |
| - runInBackground: true, |
810 |
| - library: runner |
811 |
| - }) |
812 |
| - } |
813 |
| - ) |
| 799 | + window.api.handleRefreshLibrary((e, runner) => { |
| 800 | + this.refreshLibrary({ |
| 801 | + checkForUpdates: false, |
| 802 | + runInBackground: true, |
| 803 | + library: runner |
| 804 | + }) |
| 805 | + }) |
814 | 806 |
|
815 | 807 | window.api.handleGamePush((e: IpcRendererEvent, args: GameInfo) => {
|
816 | 808 | if (!args.app_name) return
|
|
0 commit comments