diff --git a/pocket/pocket.lua b/pocket/pocket.lua index e759160..b8038f5 100644 --- a/pocket/pocket.lua +++ b/pocket/pocket.lua @@ -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