diff --git a/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx b/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx index be300fc28..96633e35b 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx @@ -28,7 +28,6 @@ const cl = classNameFactory("vc-channeltabs-"); export default function ChannelsTabsContainer(props: BasicChannelTabsProps) { const [userId, setUserId] = useState(""); - const [tabsOverflow, setTabsOverflow] = useState(false); const { showBookmarkBar, widerTabsAndBookmarks, @@ -107,7 +106,6 @@ export default function ChannelsTabsContainer(props: BasicChannelTabsProps) { }, []); const ref = useRef(null); - const scrollerRef = useRef(null); const currentChannelRef = useRef(props); currentChannelRef.current = props; @@ -141,26 +139,6 @@ export default function ChannelsTabsContainer(props: BasicChannelTabsProps) { useEffect(() => { _update(); }, [widerTabsAndBookmarks]); - useEffect(() => { - const scroller = scrollerRef.current; - if (!scroller) return; - - const checkOverflow = () => { - if (!newTabButtonBehavior) { - setTabsOverflow(true); - return; - } - const overflow = scroller.scrollWidth > scroller.clientWidth; - setTabsOverflow(overflow); - }; - - checkOverflow(); - - const observer = new ResizeObserver(checkOverflow); - observer.observe(scroller); - - return () => observer.disconnect(); - }, [openedTabs.length, newTabButtonBehavior]); useEffect(() => { const matchesKeybind = (event: KeyboardEvent, keybindString: string): boolean => { @@ -296,7 +274,7 @@ export default function ChannelsTabsContainer(props: BasicChannelTabsProps) { if (isFullscreen) return null; - const shouldFollowNewTabButton = newTabButtonBehavior && !tabsOverflow; + const shouldFollowNewTabButton = newTabButtonBehavior; const newTabButton = (