Updated the post offset in the browser files

This commit is contained in:
CaramelKat
2021-12-03 21:17:32 -06:00
committed by CaramelKat
parent d31c87829f
commit 81c243512b
6 changed files with 8 additions and 12 deletions

View File

@@ -38,7 +38,7 @@
<% if(totalNumPosts === 0) {%>
<p class="no-posts-text"><%= lang.global.no_posts %></p>
<%} else { %>
<button id="load-more-posts-button" data-offset="10" onclick="loadCommunityPosts(this, true)"><%= lang.global.more %></button>
<button id="load-more-posts-button" data-offset="20" onclick="loadCommunityPosts(this, true)"><%= lang.global.more %></button>
<% newPosts.forEach(function(post) { %>
<%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false }); %>
<% }); %>

View File

@@ -193,7 +193,7 @@
<% if(totalNumPosts === 0) {%>
<p class="no-posts-text"><%= lang.global.no_posts %></p>
<%} else { %>
<button id="load-more-posts-button" data-offset="10" onclick="loadCommunityPosts(this)"><%= lang.global.more %></button>
<button id="load-more-posts-button" data-offset="20" onclick="loadCommunityPosts(this)"><%= lang.global.more %></button>
<% newPosts.forEach(function(post) { %>
<%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false }); %>
<% }); %>

View File

@@ -22,7 +22,7 @@
<% if(posts.length === 0) {%>
<p class="no-posts-text"><%= lang.activity_feed.empty %></p>
<%} else { %>
<button id="load-more-posts-button" data-offset="10" onclick="loadFeedPosts(this)"><%= lang.global.more %></button>
<button id="load-more-posts-button" data-offset="20" onclick="loadFeedPosts(this)"><%= lang.global.more %></button>
<% posts.forEach(function(post) { %>
<%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false }); %>
<% }); %>

View File

@@ -276,11 +276,7 @@ function followCommunity(community) {
wiiuSound.playSoundByName('SE_WAVE_MII_ADD', 1);
}
}
xhttp.send(params);
}
}
function followUser(user) {
@@ -488,7 +484,7 @@ function loadUserPosts(element, pid) {
xhttp.open("GET", "/users/loadPosts" + '?offset=' + offset + '&pid=' + pid, true);
xhttp.send();
element.dataset.offset = offset + 10;
element.dataset.offset = offset + 20;
wiiuSound.playSoundByName("SE_WAVE_MENU", 1);
wiiuBrowser.showLoadingIcon(!1);
}
@@ -520,7 +516,7 @@ function loadCommunityPosts(element, typeCheck) {
xhttp.open("GET", '/communities/' + id + '/' + type + '/loadposts?offset=' + offset, true);
xhttp.send();
element.dataset.offset = offset + 10;
element.dataset.offset = offset + 20;
wiiuSound.playSoundByName("SE_WAVE_MENU", 1);
wiiuBrowser.showLoadingIcon(!1);
}
@@ -543,7 +539,7 @@ function loadFeedPosts(element) {
xhttp.open("GET", '/activity-feed/loadposts?offset=' + offset, true);
xhttp.send();
element.dataset.offset = offset + 10;
element.dataset.offset = offset + 20;
wiiuSound.playSoundByName("SE_WAVE_MENU", 1);
wiiuBrowser.showLoadingIcon(!1);
}

View File

@@ -184,7 +184,7 @@
<% if(numPosts === 0) {%>
<p class="no-posts-text"><%= lang.global.no_posts %></p>
<%} else { %>
<button id="load-more-posts-button" data-offset="10" onclick="loadUserPosts(this, '<%= user.pid %>')"><%= lang.global.more %></button>
<button id="load-more-posts-button" data-offset="20" onclick="loadUserPosts(this, '<%= user.pid %>')"><%= lang.global.more %></button>
<% newPosts.forEach(function(post) { %>
<%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, reply: false }); %>
<% }); %>

View File

@@ -141,7 +141,7 @@
<% if(numPosts === 0) {%>
<p class="no-posts-text"><%= lang.global.no_posts %></p>
<%} else { %>
<button id="load-more-posts-button" data-offset="10" onclick="loadUserPosts(this, '<%= user.pid %>')"><%= lang.global.more %></button>
<button id="load-more-posts-button" data-offset="20" onclick="loadUserPosts(this, '<%= user.pid %>')"><%= lang.global.more %></button>
<% newPosts.forEach(function(post) { %>
<%- include('post_template', { post: post, mii_image_CDN: mii_image_CDN, lang: lang, user: parentUser, reply: false }); %>
<% }); %>