Skip to content

Commit 5751762

Browse files
committedFeb 18, 2019
Fix games not updating on deletion
As reported by @random-geek
1 parent cc9bed9 commit 5751762

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎builtin/mainmenu/dlg_delete_content.lua

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ local function delete_content_buttonhandler(this, fields)
4040
if not core.delete_dir(this.data.content.path) then
4141
gamedata.errormessage = fgettext("pkgmgr: failed to delete \"$1\"", this.data.content.path)
4242
end
43-
pkgmgr.refresh_globals()
43+
44+
if this.data.content.type == "game" then
45+
pkgmgr.update_gamelist()
46+
else
47+
pkgmgr.refresh_globals()
48+
end
4449
else
4550
gamedata.errormessage = fgettext("pkgmgr: invalid path \"$1\"", this.data.content.path)
4651
end

5 commit comments

Comments
 (5)

p-ouellette commented on Feb 18, 2019

@p-ouellette
Contributor

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

rubenwardy commented on Feb 19, 2019

@rubenwardy
ContributorAuthor

Only if games is nil

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

p-ouellette commented on Feb 19, 2019

@p-ouellette
Contributor

rubenwardy commented on Feb 19, 2019

@rubenwardy
ContributorAuthor

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

random-geek commented on Feb 19, 2019

@random-geek
Contributor

Thanks, everything works now @rubenwardy :)

Please sign in to comment.