for-pi2 #2

Merged
norbert.tretkowski merged 29 commits from for-pi2 into main 2023-11-24 07:54:19 +01:00
Showing only changes of commit 4c527ec4c4 - Show all commits

View file

@ -248,8 +248,7 @@ $(document).ready(async function() {
if (hashtagsArray.length > 0 && hashtagsArray[0] !== '') {
const allPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
updateWall(allPosts.flat());
const allSlides = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
updateCarousel(slides, allSlides.flat());
updateCarousel(slides, allPosts.flat());
setTimeout(async function() { showCarousel(); }, duration)
setInterval(async function() {
@ -257,8 +256,7 @@ $(document).ready(async function() {
let updated = updateWall(newPosts.flat());
if ( updated > 0 ) {
hideCarousel()
const newSlides = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
updateCarousel(slides, newSlides.flat());
updateCarousel(slides, newPosts.flat());
setTimeout(async function() { showCarousel(); }, duration)
}
}, refresh);