menubar.show(): Remove duplicate call to menubar.refresh()

This changes a line of code that was added in the previous commit.
Previously, when menubar.cache_entries was set to false,
menubar.refresh() was called twice.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2017-03-03 17:26:15 +01:00
parent 67b12579d9
commit 232c5a014a
1 changed files with 4 additions and 1 deletions

View File

@ -388,12 +388,15 @@ end
-- @param scr Screen.
function menubar.show(scr)
if not instance then
menubar.refresh(scr)
-- Add to each category the name of its key in all_categories
for k, v in pairs(menubar.menu_gen.all_categories) do
v.key = k
end
if menubar.cache_entries then
menubar.refresh(scr)
end
instance = {
wibox = wibox({ ontop = true }),
widget = common_args.w,