Content store: Fix update button not working

This commit is contained in:
rubenwardy 2019-01-06 13:16:27 +00:00 committed by Nils Dagsson Moskopp
parent c36f81565b
commit 18400b1851
Signed by: erle
GPG Key ID: A3BC671C35191080
1 changed files with 3 additions and 1 deletions

View File

@ -229,6 +229,7 @@ function package_dialog.get_formspec()
formspec[#formspec + 1] = fgettext("Install") formspec[#formspec + 1] = fgettext("Install")
formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "]"
elseif package.installed_release < package.release then elseif package.installed_release < package.release then
-- The install_ action also handles updating
formspec[#formspec + 1] = "button[7,0;2,1;install;" formspec[#formspec + 1] = "button[7,0;2,1;install;"
formspec[#formspec + 1] = fgettext("Update") formspec[#formspec + 1] = fgettext("Update")
formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "]"
@ -477,7 +478,8 @@ function store.get_formspec()
formspec[#formspec + 1] = fgettext("Install") formspec[#formspec + 1] = fgettext("Install")
formspec[#formspec + 1] = "]" formspec[#formspec + 1] = "]"
elseif package.installed_release < package.release then elseif package.installed_release < package.release then
formspec[#formspec + 1] = "button[8.4,0;1.5,1;update_" -- The install_ action also handles updating
formspec[#formspec + 1] = "button[8.4,0;1.5,1;install_"
formspec[#formspec + 1] = tostring(i) formspec[#formspec + 1] = tostring(i)
formspec[#formspec + 1] = ";" formspec[#formspec + 1] = ";"
formspec[#formspec + 1] = fgettext("Update") formspec[#formspec + 1] = fgettext("Update")