From 35bbd14cbc8e655d37b459d012288964a7af7896 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Tue, 1 Oct 2024 16:35:04 +0000 Subject: [PATCH] #552 only modify sidebar if app is open --- pocket/pocket.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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