mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
Merge pull request #633 from IgorTimofeev/revert-630-zero-publications-handling
Revert "Properly handle no publications in overview"
This commit is contained in:
commit
0e9799f24a
@ -808,6 +808,7 @@ local function overview()
|
|||||||
category_id = 1,
|
category_id = 1,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if publications then
|
||||||
contentContainer:removeChildren()
|
contentContainer:removeChildren()
|
||||||
|
|
||||||
local iconsContainer = contentContainer:addChild(GUI.container(1, 1, contentContainer.width, contentContainer.height))
|
local iconsContainer = contentContainer:addChild(GUI.container(1, 1, contentContainer.width, contentContainer.height))
|
||||||
@ -837,11 +838,9 @@ local function overview()
|
|||||||
|
|
||||||
textLayout.height = #textLayout.children * 2
|
textLayout.height = #textLayout.children * 2
|
||||||
|
|
||||||
if #publications > 0 then
|
|
||||||
local applicationPreview = statisticsLayout:addChild(newApplicationPreview(1, 1, publications[1]))
|
local applicationPreview = statisticsLayout:addChild(newApplicationPreview(1, 1, publications[1]))
|
||||||
applicationPreview.panel.colors.background = 0xF0F0F0
|
applicationPreview.panel.colors.background = 0xF0F0F0
|
||||||
statisticsLayout:addChild(GUI.label(1, 1, statisticsLayout.width, 1, 0xA5A5A5, localization.statisticsPopularPublication)):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_CENTER)
|
statisticsLayout:addChild(GUI.label(1, 1, statisticsLayout.width, 1, 0xA5A5A5, localization.statisticsPopularPublication)):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_CENTER)
|
||||||
end
|
|
||||||
|
|
||||||
workspace:draw()
|
workspace:draw()
|
||||||
|
|
||||||
@ -941,6 +940,7 @@ local function overview()
|
|||||||
makeBlyad(iconsContainer:addChild(GUI.image(1, 1, getPublicationIcon(publications[i])), 1))
|
makeBlyad(iconsContainer:addChild(GUI.image(1, 1, getPublicationIcon(publications[i])), 1))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function settings()
|
local function settings()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user