From 319cb28ffe1e576bd6be5fc167e4460a56ffe8eb Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Tue, 15 Nov 2016 23:18:31 +0100 Subject: [PATCH] Update appList.lua --- src/apps/appList.lua | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) 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()