updated rust version, minor fixes

This commit is contained in:
2026-06-07 16:26:42 +02:00
parent b4874ad318
commit 841e8419b0
7 changed files with 143 additions and 18 deletions
+10 -1
View File
@@ -73,9 +73,14 @@ const fetchData = async () => {
'user-token': localStorage.getItem("user-token")
}
});
const items = [];
response.data.feeds.forEach(feed => {
feed.items.forEach(item => feeds.value.push({ ...item, feedTitle: feed.title }));
feed.items.forEach(item => items.push({ ...item, feedTitle: feed.title }));
});
// timestamps are zero-padded "YYYY-MM-DD HH:MM:SS" strings, so a plain
// lexicographic comparison sorts them chronologically.
items.sort((a, b) => b.timestamp.localeCompare(a.timestamp));
feeds.value = items;
await nextTick();
setupIntersectionObserver();
} catch (error) {
@@ -109,6 +114,10 @@ async function sync() {
let observer; // Declare observer outside the setup function
function setupIntersectionObserver() {
if (observer) {
observer.disconnect();
}
observer = new IntersectionObserver(handleIntersection, {
root: null, // Use the viewport as the root
rootMargin: '0px',