for-pi2 #3

Merged
norbert.tretkowski merged 5 commits from max.lissowski/mastowall:for-pi2 into for-pi2 2023-11-24 21:14:12 +01:00
Showing only changes of commit 12fca72480 - Show all commits

View file

@ -165,9 +165,17 @@ const updateCarousel = function(slides, posts) {
var newHTML = ` <!-- No Indicators -->` var newHTML = ` <!-- No Indicators -->`
newHTML += `<!-- the slides --> newHTML += `<!-- the slides -->
<div class="carousel-inner"> <div class="carousel-inner">
` `;
let existingCards = [];
for( let i = 0; i < posts.length; i++ ) { for( let i = 0; i < posts.length; i++ ) {
let post = posts[i]; let post = posts[i];
if (existingCards.includes(post.id) || (!includeReplies && post.in_reply_to_id !== null)) continue;
existingCards.push(post.id);
/*console.log( post.content )*/ /*console.log( post.content )*/
if ( i == 0 ) { if ( i == 0 ) {
newHTML += `<div class="carousel-item active" data-mdb-interval="${duration}" data-mdb-pause="false">`; newHTML += `<div class="carousel-item active" data-mdb-interval="${duration}" data-mdb-pause="false">`;