Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove sideloaded games from recent list when uninstalled #4178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/backend/storeManagers/sideload/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { notify } from '../../dialog/dialog'
import { launchGame } from 'backend/storeManagers/storeManagerCommon/games'
import { GOGCloudSavesLocation } from 'common/types/gog'
import { InstallResult, RemoveArgs } from 'common/types/game_manager'
import { removeRecentGame } from 'backend/recent_games/recent_games'

export function getGameInfo(appName: string): GameInfo {
const store = libraryStore.get('games', [])
Expand Down Expand Up @@ -128,6 +129,7 @@ export async function uninstall({
notify({ title, body: i18next.t('notify.uninstalled') })

removeShortcutsUtil(gameInfo)
removeRecentGame(appName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add awaits and await removeNonSteamGame({ gameInfo }) as well ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand we intentionally don't await for these things, they can happen async and makes it faster

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could still wrap 'em in an await Promise.all([ ... ]) to at least run them in parallel

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aren't those already running in parallel? I think we really don't care about waiting for the result of those calls at all

is there any benefit I'm missing?

Copy link
Member

@Etaash-mathamsetty Etaash-mathamsetty Dec 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it would be better if everything was removed by the time this function returned, but it's not necessary. Also the other uninstall functions use awaits


sendGameStatusUpdate({
appName,
Expand Down
Loading