Customize home screen (#250)

* Customize home screen

* remove logs

* Lint fix

* move func

* Fix for checklist

* Fix save state

* open api

* Fix spec

* Changelog

* Add TODO

* Button size

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
Brahim Hadricheandgithub-action linter authored and GitHub committed 2024-01-06 18:17:29 -05:00
1 parent e7324495fe
commit fd7bdde733
21 files changed
+638 -16

No files matched your search

@@ -7,7 +7,7 @@
// TODO:P1 figure out why some uncached feeds (e.g. channels/ucid/videos) get hit twice
export let feed: any = undefined;
export let videos = [];
let videos = [];
enum FeedLoadState {
None,
@@ -28,6 +28,8 @@
let scrollStart = 0;
let scrollEnd = 0;
let loadDataTask = undefined;
// w-80|w-60 p-2: 320px|240px + 16px padding on each side
const videoItemWidth = 320 + 16 * 2;
const channelItemWidth = 240 + 16 * 2;
@@ -42,6 +44,18 @@
{ threshold: [0] }
);
$: {
if (feed) {
feedSourcesIndex = 0;
feedLoadState = FeedLoadState.None;
videos = [];
itemWidths = [];
scrollStart = 0;
scrollEnd = 0;
loadDataTask = undefined;
}
}
$: {
if (
carouselElement &&
@@ -112,8 +126,6 @@
loadDataTask = undefined;
}
let loadDataTask;
async function loadData() {
feedLoadState = FeedLoadState.Loading;
let totalFetchedItems = 0;