updated rust version, minor fixes
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user