diff --git a/apps/desktop/layer/renderer/src/hooks/biz/useTimelineList.ts b/apps/desktop/layer/renderer/src/hooks/biz/useTimelineList.ts index 4f288489a..2dc3b2dc6 100644 --- a/apps/desktop/layer/renderer/src/hooks/biz/useTimelineList.ts +++ b/apps/desktop/layer/renderer/src/hooks/biz/useTimelineList.ts @@ -22,7 +22,7 @@ export const useTimelineList = (options?: { const savedHidden = (timelineTabs?.hidden ?? []).filter((id) => ids.includes(id)) const extra = ids.filter((id) => !savedVisible.includes(id) && !savedHidden.includes(id)) - const visible = [...savedVisible, ...extra].slice(0, 5) + const visible = [...savedVisible, ...extra] if (options?.visible) return visible const hidden = [...savedHidden, ...extra].filter((id) => !visible.includes(id)) if (options?.hidden) return hidden diff --git a/apps/desktop/layer/renderer/src/modules/subscription-column/TimelineTabsSettingsModal.tsx b/apps/desktop/layer/renderer/src/modules/subscription-column/TimelineTabsSettingsModal.tsx index 1137c1c3e..c381b8941 100644 --- a/apps/desktop/layer/renderer/src/modules/subscription-column/TimelineTabsSettingsModal.tsx +++ b/apps/desktop/layer/renderer/src/modules/subscription-column/TimelineTabsSettingsModal.tsx @@ -27,8 +27,6 @@ import { useModalStack } from "~/components/ui/modal/stacked/hooks" import { parseView } from "~/hooks/biz/useRouteParams" import { useTimelineList } from "~/hooks/biz/useTimelineList" -const MAX_VISIBLE = 5 - function ContainerDroppable({ id, children }: { id: "visible" | "hidden"; children: ReactNode }) { const { setNodeRef, isOver } = useDroppable({ id, data: { container: id } }) return ( @@ -130,27 +128,6 @@ const TimelineTabsSettings = () => { const sourceList = current(sourceKey) const targetList = current(targetKey) - // If moving into visible and it's full, replace the hovered item - if (targetKey === "visible" && targetList.length >= MAX_VISIBLE) { - const replaceIndex = targetList.indexOf(overId) - if (replaceIndex === -1) return // container hover; ignore - const replacedId = targetList[replaceIndex]! - - const nextVisible = [...targetList] - nextVisible[replaceIndex] = activeId - - const activeIndexInSource = sourceList.indexOf(activeId) - const nextSource = sourceList.filter((i) => i !== activeId) - const insertIndex = activeIndexInSource !== -1 ? activeIndexInSource : nextSource.length - nextSource.splice(insertIndex, 0, replacedId) - - setUISetting("timelineTabs", { - visible: nextVisible, - hidden: targetKey === "visible" ? nextSource : hidden, - }) - return - } - // Normal cross-container insert const newIndexOfOver = targetList.indexOf(overId) const insertIndex = newIndexOfOver !== -1 ? newIndexOfOver : targetList.length @@ -183,15 +160,9 @@ const TimelineTabsSettings = () => { return (
- First tab is fixed. Drag to choose up to {MAX_VISIBLE} visible tabs. -
-