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

@ -1,7 +1,7 @@
<template>
<div>
<div v-if="stories.length != 0">
<div id="storyContainer" :class="[list == true ? 'mt-1 mr-3 mb-0 ml-1':'m-3']"></div>
<div id="storyContainer" :class="[list == true ? 'mt-1 mr-3 mb-0 ml-1':'mx-3 mt-3 mb-0 pb-0']"></div>
</div>
</div>
</template>
@ -79,17 +79,17 @@
#storyContainer .story {
margin-right: 2rem;
width: 100%;
max-width: 64px;
max-width: 60px;
}
.stories.carousel .story > .item-link > .item-preview {
height: 64px;
height: 60px;
}
#zuck-modal.with-effects {
width: 100%;
}
.stories.carousel .story > .item-link > .info .name {
font-weight: 600;
font-size: 12px;
font-weight: 500;
font-size: 11px;
}
.stories.carousel .story > .item-link > .info {
}

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();