Fix missing separator when first series is not available

This commit is contained in:
emanuele-f 2019-06-07 14:53:32 +02:00
parent 87dd774e63
commit a15f5fe485

View file

@ -340,18 +340,25 @@ end
function printGraphMenuEntries(entry_print_callback)
local active_entries = {}
local active_idx = 1 -- index in active_entries
local needs_separator = false
local separator_label = nil
for _, entry in ipairs(graph_menu_entries) do
needs_separator = needs_separator or entry.needs_separator
separator_label = separator_label or entry.separator_label
if(entry.pending and (entry.pending > 0)) then
-- not verified, act like it does not exist
goto continue
end
if(entry.needs_separator) then
if(needs_separator) then
print(makeMenuDivider())
needs_separator = false
end
if(entry.separator_label) then
print(makeMenuHeader(entry.separator_label))
if(separator_label) then
print(makeMenuHeader(separator_label))
separator_label = nil
end
if entry.html then