Directly show new posts in carousel

This commit is contained in:
Max L. 2023-11-25 01:13:05 +01:00
parent c12f8220f4
commit 8efbafef3c
No known key found for this signature in database
GPG key ID: 2F963B95632B8467

View file

@ -341,9 +341,7 @@ $(document).ready(async function() {
const newPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag))); const newPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
let updated = updateWall(newPosts.flat()); let updated = updateWall(newPosts.flat());
if ( updated > 0 ) { if ( updated > 0 ) {
hideCarousel()
updateCarousel(slides, newPosts.flat()); updateCarousel(slides, newPosts.flat());
setTimeout(async function() { showCarousel(); }, duration)
} }
}, refresh); }, refresh);
} else { } else {