summaryrefslogtreecommitdiffstats
path: root/app/cfgfile-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'app/cfgfile-model.lua')
-rw-r--r--app/cfgfile-model.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/cfgfile-model.lua b/app/cfgfile-model.lua
index e5423d8..281ee2c 100644
--- a/app/cfgfile-model.lua
+++ b/app/cfgfile-model.lua
@@ -47,12 +47,15 @@ local function getLbuStatus()
return ret
end
-function list(self, app)
+--TODO this 'filter' breaks model isolation by requring caller to know
+--keys in files[] items. But this way the breakage is at least very obvious,
+--unlike passing these values as an argument to this function.
+function list(self, filter)
loadCfg()
local ret = {}
local lbuStatus = getLbuStatus()
for k,v in pairs(files) do
- if v.app == app then
+ if not filter or filter(v) then
ret[#ret+1] = {
id=k,
app=v.app,