Update Timeline.vue, fix load more posts

This commit is contained in:
Daniel Supernault 2020-05-28 23:33:06 -06:00
parent 28445e27b8
commit 45a45c46ef
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 8 additions and 7 deletions

View file

@ -7,7 +7,7 @@
</p>
</div>
<div :class="[modes.distractionFree ? 'col-md-8 col-lg-8 offset-md-2 px-0 mb-sm-3 timeline order-2 order-md-1':'col-md-8 col-lg-8 px-0 mb-sm-3 timeline order-2 order-md-1']">
<div v-if="config.features.stories">
<div v-if="config.features.stories" class="card card-body p-0 border mt-4 mb-3 shadow-none">
<story-component v-if="config.features.stories"></story-component>
</div>
<div>
@ -1533,8 +1533,9 @@
}
}).then(res => {
let self = this;
let tids = this.feed.map(status => status.id);
let data = res.data.filter(d => {
return d.id > self.min_id
return d.id > self.min_id && tids.indexOf(d.id) == -1;
});
let ids = data.map(status => status.id);
let max = Math.max(...ids).toString();