diff --git a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx index 11b2dffe2..24f6f0b36 100644 --- a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx +++ b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx @@ -452,7 +452,7 @@ function Bookmark(props: BookmarkProps & { isExpanded?: boolean; onToggleFolder? ); } -function HorizontalScroller({ children, className, customRef }: React.PropsWithChildren<{ className?: string; customRef?: (node: HTMLDivElement) => void; }>) { +export function HorizontalScroller({ children, className, customRef }: React.PropsWithChildren<{ className?: string; customRef?: (node: HTMLDivElement) => void; }>) { const internalRef = useRef(null); useEffect(() => { @@ -461,7 +461,7 @@ function HorizontalScroller({ children, className, customRef }: React.PropsWithC const handleWheel = (e: WheelEvent) => { e.preventDefault(); - element.scrollLeft += e.deltaY; + element.scrollLeft += e.deltaX + e.deltaY; }; element.addEventListener("wheel", handleWheel); diff --git a/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx b/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx index e7df8227a..3210785d1 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx @@ -14,7 +14,7 @@ import { findComponentByCodeLazy, findStoreLazy } from "@webpack"; import { Button, ContextMenuApi, Flex, FluxDispatcher, useCallback, useEffect, useRef, UserStore, useState, useStateFromStores } from "@webpack/common"; import { BasicChannelTabsProps, ChannelTabsProps, clearStaleNavigationContext, closeTab, createTab, handleChannelSwitch, isNavigationFromSource, isTabSelected, moveToTab, openedTabs, openStartupTabs, saveTabs, settings, setUpdaterFunction, useGhostTabs } from "../util"; -import BookmarkContainer from "./BookmarkContainer"; +import BookmarkContainer, { HorizontalScroller } from "./BookmarkContainer"; import ChannelTab, { PreviewTab } from "./ChannelTab"; import { BasicContextMenu } from "./ContextMenus"; @@ -100,7 +100,6 @@ export default function ChannelsTabsContainer(props: BasicChannelTabsProps) { }, [userId]); const ref = useRef(null); - const tabScrollerRef = useRef(null); useEffect(() => { setUpdaterFunction(update); @@ -296,11 +295,11 @@ export default function ChannelsTabsContainer(props: BasicChannelTabsProps) {
}
-
+ {openedTabs.filter(tab => tab != null).map((tab, i) => )} -
+