Fix for feed not loading properly.

Closes #4173
This commit is contained in:
Kavin
2026-03-28 01:38:22 +05:30
parent a43db165e1
commit 605deeb6d5

View File

@@ -85,7 +85,7 @@ const { t } = useI18n();
let currentVideoCount = 0; let currentVideoCount = 0;
const videoStep = 100; const videoStep = 100;
let videosStore = null; const videosStore = ref(null);
const videos = ref([]); const videos = ref([]);
const availableFilters = ["all", "shorts", "videos"]; const availableFilters = ["all", "shorts", "videos"];
const selectedFilter = ref("all"); const selectedFilter = ref("all");
@@ -110,11 +110,11 @@ const filteredVideos = computed(() => {
}); });
function loadMoreVideos() { function loadMoreVideos() {
if (!videosStore) return; if (!videosStore.value) return;
currentVideoCount = Math.min(currentVideoCount + videoStep, videosStore.length); currentVideoCount = Math.min(currentVideoCount + videoStep, videosStore.value.length);
if (videos.value.length != videosStore.length) { if (videos.value.length != videosStore.value.length) {
fetchDeArrowContent(videosStore.slice(videos.value.length, currentVideoCount)); fetchDeArrowContent(videosStore.value.slice(videos.value.length, currentVideoCount));
videos.value = videosStore.slice(0, currentVideoCount); videos.value = videosStore.value.slice(0, currentVideoCount);
} }
} }
@@ -156,7 +156,7 @@ onMounted(() => {
return; return;
} }
videosStore = resp; videosStore.value = resp;
loadMoreVideos(); loadMoreVideos();
updateWatched(videos.value); updateWatched(videos.value);
}); });