From fa54572279faa52aae55a695614c77d5ed1938bf Mon Sep 17 00:00:00 2001 From: Mic Date: Wed, 15 Apr 2026 23:39:00 +0200 Subject: [PATCH] tab filtering fixed. see #680 --- pages/menu_order/mzta-menu-order.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/menu_order/mzta-menu-order.js b/pages/menu_order/mzta-menu-order.js index 55a81785..743d892b 100644 --- a/pages/menu_order/mzta-menu-order.js +++ b/pages/menu_order/mzta-menu-order.js @@ -82,12 +82,15 @@ function initSubTabs() { function renderPopupList() { const posKey = currentPopupView === 'display' ? 'position_display' : 'position_compose'; + // Filter by type: reading view shows type 0+1, composing view shows type 0+2 + const allowedTypes = currentPopupView === 'display' ? ['0', '1'] : ['0', '2']; + const typeFiltered = allPrompts.filter(p => allowedTypes.includes(String(p.type))); - const activeItems = allPrompts.filter(p => { + const activeItems = typeFiltered.filter(p => { const showIn = p.show_in || 'popup'; return showIn === 'popup' || showIn === 'both'; }); - const hiddenItems = allPrompts.filter(p => { + const hiddenItems = typeFiltered.filter(p => { const showIn = p.show_in || 'popup'; return showIn !== 'popup' && showIn !== 'both'; });