From 554de62aaa269c334fda8d88848dffe7270f7eb7 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Mon, 15 May 2023 22:29:44 +0200 Subject: refactor: Remove caller pattern (#356) * refactor: Remove caller pattern for `launch_northstar` * refactor: Remove caller pattern for `check_is_flightcore_outdated` * refactor: Remove caller pattern for `get_host_os` * refactor: Remove caller pattern for `find_game_install_location` * refactor: Remove caller pattern for `launch_northstar_steam` * fix: Update function call names in frontend * refactor: Remove caller pattern for `get_northstar_version_number` * fix: Address clippy issues * refactor: Rename function to remove `_caller` suffix --- src-vue/src/plugins/store.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src-vue/src/plugins') diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index de4b3816..7d1b6c20 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -174,7 +174,7 @@ export const store = createStore({ } as GameInstall; if (no_checks) { - await invoke("launch_northstar_caller", { gameInstall: game_install, bypassChecks: no_checks }) + await invoke("launch_northstar", { gameInstall: game_install, bypassChecks: no_checks }) .then((message) => { console.log("Launched with bypassed checks"); console.log(message); @@ -224,7 +224,7 @@ export const store = createStore({ // Game is ready to play. case NorthstarState.READY_TO_PLAY: - await invoke("launch_northstar_caller", { gameInstall: game_install }) + await invoke("launch_northstar", { gameInstall: game_install }) .then((message) => { console.log(message); // NorthstarState.RUNNING @@ -246,7 +246,7 @@ export const store = createStore({ install_type: state.install_type } as GameInstall; - await invoke("launch_northstar_steam_caller", { gameInstall: game_install, bypassChecks: no_checks }) + await invoke("launch_northstar_steam", { gameInstall: game_install, bypassChecks: no_checks }) .then((message) => { showNotification('Success'); }) @@ -403,7 +403,7 @@ async function _initializeApp(state: any) { } if (result === undefined) { // No (valid) value found in persistent store - result = await invoke("find_game_install_location_caller") + result = await invoke("find_game_install_location") .catch((err) => { // Gamepath not found or other error console.error(err); @@ -445,7 +445,7 @@ async function _initializeApp(state: any) { async function _checkForFlightCoreUpdates(state: FlightCoreStore) { // Check if FlightCore up-to-date - let flightcore_is_outdated = await invoke("check_is_flightcore_outdated_caller") as boolean; + let flightcore_is_outdated = await invoke("check_is_flightcore_outdated") as boolean; if (flightcore_is_outdated) { let newest_flightcore_version = await invoke("get_newest_flightcore_version") as FlightCoreVersion; @@ -482,7 +482,7 @@ function _initializeListeners(state: any) { * state, for it to be displayed in UI. */ async function _get_northstar_version_number(state: any) { - await invoke("get_northstar_version_number_caller", { gamePath: state.game_path }) + await invoke("get_northstar_version_number", { gamePath: state.game_path }) .then((message) => { let northstar_version_number: string = message as string; state.installed_northstar_version = northstar_version_number; -- cgit v1.2.3