#552 only modify sidebar if app is open

This commit is contained in:
Mikayla
2024-10-01 16:35:04 +00:00
parent 316dc5819f
commit 35bbd14cbc

View File

@@ -167,8 +167,11 @@ function pocket.init_nav(smem)
-- configure the sidebar
---@param items sidebar_entry[]
function app.set_sidebar(items)
app.sidebar_items = items
if self.sidebar then self.sidebar.update(items) end
-- only modify the sidebar if this app is still open
if self.cur_app == app_id then
app.sidebar_items = items
if self.sidebar then self.sidebar.update(items) end
end
end
-- function to run on initial load into memory