fix hidden apps being visible
This commit is contained in:
@@ -35,14 +35,19 @@ local function mainloop()
|
|||||||
foreground=colors.white
|
foreground=colors.white
|
||||||
}):fillWidth():setText("Apps:")
|
}):fillWidth():setText("Apps:")
|
||||||
local apps = app.getApps()
|
local apps = app.getApps()
|
||||||
|
local offset = 0
|
||||||
for i,iapp in ipairs(apps) do
|
for i,iapp in ipairs(apps) do
|
||||||
|
if not iapp.hidden then
|
||||||
appFrame:addLabel({
|
appFrame:addLabel({
|
||||||
backgroundEnabled=false,
|
backgroundEnabled=false,
|
||||||
x=1,
|
x=1,
|
||||||
y=i+1,
|
y=i+1-offset,
|
||||||
background=colors.white,
|
background=colors.white,
|
||||||
foreground=colors.white
|
foreground=colors.white
|
||||||
}):fillWidth():setText(iapp.name):onClick(function () app.launch(iapp.appid,iapp.perms)end)
|
}):fillWidth():setText(iapp.name):onClick(function () app.launch(iapp.appid,iapp.perms)end)
|
||||||
|
else
|
||||||
|
offset = offset + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
processFrame:clear()
|
processFrame:clear()
|
||||||
processFrame:addLabel({
|
processFrame:addLabel({
|
||||||
@@ -54,7 +59,7 @@ local function mainloop()
|
|||||||
local apps = app.getRunningApps()
|
local apps = app.getRunningApps()
|
||||||
for i,pid in ipairs(apps) do
|
for i,pid in ipairs(apps) do
|
||||||
local appData,msg = app.getDetail(pid)
|
local appData,msg = app.getDetail(pid)
|
||||||
if appData and not appData.hidden then
|
if appData then
|
||||||
processFrame:addLabel({
|
processFrame:addLabel({
|
||||||
x=1,
|
x=1,
|
||||||
y=i,
|
y=i,
|
||||||
|
|||||||
Reference in New Issue
Block a user