mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-05 12:22:35 +02:00
Fix show more comments appearing too many times
This commit is contained in:
parent
728f89300f
commit
56d4c7410a
1 changed files with 2 additions and 2 deletions
|
@ -64,7 +64,7 @@ export default {
|
||||||
"/comments?limit=5&start_index=" + this.comments_start_idx).then(response => {
|
"/comments?limit=5&start_index=" + this.comments_start_idx).then(response => {
|
||||||
|
|
||||||
// If there are no more comments, set the flag
|
// If there are no more comments, set the flag
|
||||||
if (response.data.length == 0) this.data_ended = true;
|
if (response.data.length == 0 || response.data.length < 5) this.data_ended = true;
|
||||||
|
|
||||||
// Otherwise increment the start index
|
// Otherwise increment the start index
|
||||||
else this.comments_start_idx += 5;
|
else this.comments_start_idx += 5;
|
||||||
|
@ -167,7 +167,7 @@ export default {
|
||||||
|
|
||||||
<!-- Show more comments label -->
|
<!-- Show more comments label -->
|
||||||
<div v-if="!data_ended" class="col-12 card-body text-end pt-0 pb-1 px-0">
|
<div v-if="!data_ended" class="col-12 card-body text-end pt-0 pb-1 px-0">
|
||||||
<a @click="getComments" class="text-primary">Mostra altro...</a>
|
<a @click="getComments" class="text-primary">Show more comments...</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- New comment form -->
|
<!-- New comment form -->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue