fix: cleanup of tag icon in action bar

This commit is contained in:
2026-02-21 16:07:43 +01:00
parent cdf064b6a1
commit 69007ef393
3 changed files with 121 additions and 7 deletions

View File

@@ -1223,11 +1223,19 @@ import { scrollToTagsSection, TagsCategory } from '../TagsView';
const TagsNav: React.FC = () => {
const { t } = useI18n();
const { tabs, activeTabId, openTab } = useAppStore();
const [activeSection, setActiveSection] = useState<TagsCategory | null>(null);
const isTagsTabActive = tabs.some(t => t.type === 'tags' && t.id === activeTabId);
const handleNavClick = (category: TagsCategory) => {
if (!isTagsTabActive) {
openTab({ type: 'tags', id: 'tags', isTransient: false });
}
setActiveSection(category);
scrollToTagsSection(category);
setTimeout(() => {
scrollToTagsSection(category);
}, isTagsTabActive ? 0 : 100);
};
return (