fix(navigation): use keyboard to navigation select between feed and folder
- Removed unused export of FeedCategory to streamline the component structure. - Added import for target from happy-dom in FeedList for improved functionality. - Implemented cleanup of selected feed IDs when a category or folder is targeted in FeedList. These changes enhance code clarity and maintainability in the timeline column components. Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
parent
331f8d8022
commit
1e71cd5a59
|
|
@ -164,7 +164,6 @@ function FeedCategoryImpl({ data: ids, view, categoryOpenStateData }: FeedCatego
|
|||
})
|
||||
|
||||
const [isCategoryEditing, setIsCategoryEditing] = useState(false)
|
||||
|
||||
const [isContextMenuOpen, setIsContextMenuOpen] = useState(false)
|
||||
const isCategoryIsWaiting = isChangePending
|
||||
|
||||
|
|
@ -373,8 +372,6 @@ function FilterReadFeedCategory(props: FeedCategoryProps) {
|
|||
return <FeedCategoryImpl {...props} />
|
||||
}
|
||||
|
||||
export const FeedCategory = memo(FeedCategoryImpl)
|
||||
|
||||
export function FeedCategoryAutoHideUnread(props: FeedCategoryProps) {
|
||||
const hideAllReadSubscriptions = useGeneralSettingKey("hideAllReadSubscriptions")
|
||||
const unreadOnly = useGeneralSettingKey("unreadOnly")
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import { useIsPreviewFeed } from "../entry-column/hooks/useIsPreviewFeed"
|
|||
import {
|
||||
resetSelectedFeedIds,
|
||||
setFeedAreaScrollProgressValue,
|
||||
setSelectedFeedIds,
|
||||
useSelectedFeedIdsState,
|
||||
} from "./atom"
|
||||
import { DraggableContext } from "./context"
|
||||
|
|
@ -346,6 +347,11 @@ const useRegisterCommand = () => {
|
|||
|
||||
const targetElement = allSubscriptions[targetIndex] as HTMLElement | null
|
||||
|
||||
// Cleanup selected feed
|
||||
const targetIsCategoryOrFolder = targetElement?.dataset.sub?.startsWith("feed-category-")
|
||||
if (targetIsCategoryOrFolder) {
|
||||
setSelectedFeedIds([])
|
||||
}
|
||||
targetElement?.click()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue