[READ-ONLY] Mirror of https://github.com/probablykasper/kadium. App for staying ontop of YouTube channels' uploads kadium.kasper.space
linux macos notifications tauri windows youtube
0

Configure Feed

Select the types of activity you want to include in your feed.

Allow selecting bottom row diagonally with `ArrowDown`

Kasper (Jan 10, 2024, 6:20 AM +0100) 1af58cf6 79aa8b5d

+5 -5
+1
CHANGELOG.md
··· 2 2 3 3 ## Next 4 4 - Load 100 videos at a time instead of 50 5 + - Allow selecting bottom row diagonally with the down arrow key 5 6 6 7 ## 1.5.0 - 2023 Nov 19 7 8 - Add support for all channel URLs. URLs like `/lacunarecs`, `/@lacunarecs`, `/c/lacunarecs`, `/user/lacunarecs` and even `/lacunarecs/playlists` etc work now.
+4 -5
src/routes/+page.svelte
··· 53 53 await autoloadHandler() 54 54 } 55 55 async function autoloadHandler() { 56 - if (!allLoaded && isScrolledToBottom() && !loading) { 56 + if (!allLoaded && isScrolledNearBottom() && !loading) { 57 57 await getMoreVideos() 58 58 } 59 59 } ··· 99 99 } 100 100 101 101 let scrollDiv: HTMLElement | null = null 102 - function isScrolledToBottom() { 102 + function isScrolledNearBottom() { 103 103 if (scrollDiv) { 104 104 const lastElement = boxes[videos.length - 1] 105 105 const threshold = lastElement.offsetTop - 200 ··· 159 159 e.preventDefault() 160 160 } else if (checkShortcut(e, 'ArrowDown')) { 161 161 const columnCount = getColumnCount() 162 - if (selectedIndex + columnCount <= videos.length - 1) { 163 - selectedIndex += columnCount 164 - } 162 + selectedIndex += columnCount 163 + selectedIndex = Math.min(selectedIndex, videos.length - 1) 165 164 e.preventDefault() 166 165 } else if (checkShortcut(e, 'Escape')) { 167 166 selectionVisible = false