diff --git a/src/apps/appList.lua b/src/apps/appList.lua index 9e1efc5..025a4dc 100644 --- a/src/apps/appList.lua +++ b/src/apps/appList.lua @@ -1,26 +1,11 @@ local spkList = "/.sPhone/config/spklist" -local dir = "/.sPhone/spk/" +local dir = "/.sPhone/apps/spk/" if not fs.exists(spkList) then config.list("/.sPhone/config/spklist") end - local _list = config.list("/.sPhone/config/spklist") - local apps = {} - for k, v in pairs(_list) do - if fs.isDir("/.sPhone/spk/"..k) then - if fs.exists(dir..k.."/.spk") then - local nDir = dir..k.."/.spk" - pDir = dir..k.."/.spk" - local name = config.read(pDir,"name") - local author = config.read(pDir,"author") - local version = config.read(pDir,"version") - local id = k - end - end - end - for k,v in pairs(config.list(spkList)) do table.insert(apps,{ id = k, @@ -28,6 +13,13 @@ end }) end + for k,v in ipairs(apps) do + local hid = config.read(dir..v.id.."/.spk","hidden") + if hid then + table.remove(apps,k) + end + end + local function drawHome() term.setBackgroundColor(sPhone.theme["backgroundColor"]) term.clear()