Skip to content
Permalink
Browse files

Fix games not updating on deletion

As reported by @random-geek
  • Loading branch information...
rubenwardy committed Feb 18, 2019
1 parent cc9bed9 commit 57517628f03632587f68b5e8a1e6c641be07e629
Showing with 6 additions and 1 deletion.
  1. +6 −1 builtin/mainmenu/dlg_delete_content.lua
@@ -40,7 +40,12 @@ local function delete_content_buttonhandler(this, fields)
if not core.delete_dir(this.data.content.path) then
gamedata.errormessage = fgettext("pkgmgr: failed to delete \"$1\"", this.data.content.path)
end
pkgmgr.refresh_globals()

if this.data.content.type == "game" then
pkgmgr.update_gamelist()
else
pkgmgr.refresh_globals()
end
else
gamedata.errormessage = fgettext("pkgmgr: invalid path \"$1\"", this.data.content.path)
end

5 comments on commit 5751762

@pauloue

This comment has been minimized.

Copy link
Contributor

replied Feb 18, 2019

What does this fix? update_gamelist was already being called by the content tab's on_change.

@rubenwardy

This comment has been minimized.

Copy link
Member Author

replied Feb 19, 2019

Only if games is nil

if pkgmgr.games == nil then
	pkgmgr.update_gamelist()
end
@pauloue

This comment has been minimized.

Copy link
Contributor

replied Feb 19, 2019

I meant this:

on_change = pkgmgr.update_gamelist

Which is called when the delete dialog is closed.

@rubenwardy

This comment has been minimized.

Copy link
Member Author

replied Feb 19, 2019

Well, I did this based on a report by @random-geek. Maybe they meant the game bar, and not the content tab

@random-geek

This comment has been minimized.

Copy link
Contributor

replied Feb 19, 2019

Thanks, everything works now @rubenwardy :)

Please sign in to comment.
You can’t perform that action at this time.