for-pi2 #2
1 changed files with 2 additions and 4 deletions
|
@ -248,8 +248,7 @@ $(document).ready(async function() {
|
||||||
if (hashtagsArray.length > 0 && hashtagsArray[0] !== '') {
|
if (hashtagsArray.length > 0 && hashtagsArray[0] !== '') {
|
||||||
const allPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
|
const allPosts = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
|
||||||
updateWall(allPosts.flat());
|
updateWall(allPosts.flat());
|
||||||
const allSlides = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
|
updateCarousel(slides, allPosts.flat());
|
||||||
updateCarousel(slides, allSlides.flat());
|
|
||||||
|
|
||||||
setTimeout(async function() { showCarousel(); }, duration)
|
setTimeout(async function() { showCarousel(); }, duration)
|
||||||
setInterval(async function() {
|
setInterval(async function() {
|
||||||
|
@ -257,8 +256,7 @@ $(document).ready(async function() {
|
||||||
let updated = updateWall(newPosts.flat());
|
let updated = updateWall(newPosts.flat());
|
||||||
if ( updated > 0 ) {
|
if ( updated > 0 ) {
|
||||||
hideCarousel()
|
hideCarousel()
|
||||||
const newSlides = await Promise.all(hashtagsArray.map(hashtag => fetchPosts(serverUrl, hashtag)));
|
updateCarousel(slides, newPosts.flat());
|
||||||
updateCarousel(slides, newSlides.flat());
|
|
||||||
setTimeout(async function() { showCarousel(); }, duration)
|
setTimeout(async function() { showCarousel(); }, duration)
|
||||||
}
|
}
|
||||||
}, refresh);
|
}, refresh);
|
||||||
|
|
Loading…
Reference in a new issue