Update Timeline, disable new post update checker and hide reaction bar on network timeline

This commit is contained in:
Daniel Supernault 2021-06-29 01:03:47 -06:00
parent 3ba31bdc7c
commit 1e3d3a69d2
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 18 additions and 10 deletions

View file

@ -105,6 +105,7 @@
<status-card <status-card
:status="status" :status="status"
:reaction-bar="reactionBar"
v-on:status-delete="deleteStatus" v-on:status-delete="deleteStatus"
v-on:comment-focus="commentFocus" v-on:comment-focus="commentFocus"
/> />
@ -707,7 +708,8 @@
discover_feed: [], discover_feed: [],
recentFeed: this.scope === 'home' ? true : false, recentFeed: this.scope === 'home' ? true : false,
recentFeedMin: null, recentFeedMin: null,
recentFeedMax: null recentFeedMax: null,
reactionBar: this.scope === 'network' ? false : true
} }
}, },
@ -831,7 +833,8 @@
this.fetchHashtagPosts(); this.fetchHashtagPosts();
} }
// this.fetchStories(); // this.fetchStories();
this.rtw(); // this.rtw();
setTimeout(function() { setTimeout(function() {
document.querySelectorAll('.timeline .card-body .comments .comment-body a').forEach(function(i, e) { document.querySelectorAll('.timeline .card-body .comments .comment-body a').forEach(function(i, e) {
i.href = App.util.format.rewriteLinks(i); i.href = App.util.format.rewriteLinks(i);
@ -902,10 +905,10 @@
if(self.ids.indexOf(d.id) == -1) { if(self.ids.indexOf(d.id) == -1) {
self.feed.push(d); self.feed.push(d);
self.ids.push(d.id); self.ids.push(d.id);
vids.push({ // vids.push({
sid: d.id, // sid: d.id,
pid: d.account.id // pid: d.account.id
}); // });
} }
}); });
this.min_id = Math.max(...this.ids).toString(); this.min_id = Math.max(...this.ids).toString();
@ -913,9 +916,9 @@
this.page += 1; this.page += 1;
$state.loaded(); $state.loaded();
this.loading = false; this.loading = false;
axios.post('/api/status/view', { // axios.post('/api/status/view', {
'_v': vids, // '_v': vids,
}); // });
} else { } else {
$state.complete(); $state.complete();
} }

View file

@ -74,7 +74,7 @@
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="reactions my-1 pb-2"> <div v-if="reactionBar" class="reactions my-1 pb-2">
<h3 v-if="status.favourited" class="fas fa-heart text-danger pr-3 m-0 cursor-pointer" title="Like" v-on:click="likeStatus(status, $event);"></h3> <h3 v-if="status.favourited" class="fas fa-heart text-danger pr-3 m-0 cursor-pointer" title="Like" v-on:click="likeStatus(status, $event);"></h3>
<h3 v-else class="far fa-heart pr-3 m-0 like-btn text-dark cursor-pointer" title="Like" v-on:click="likeStatus(status, $event);"></h3> <h3 v-else class="far fa-heart pr-3 m-0 like-btn text-dark cursor-pointer" title="Like" v-on:click="likeStatus(status, $event);"></h3>
<h3 v-if="!status.comments_disabled" class="far fa-comment text-dark pr-3 m-0 cursor-pointer" title="Comment" v-on:click="commentFocus(status, $event)"></h3> <h3 v-if="!status.comments_disabled" class="far fa-comment text-dark pr-3 m-0 cursor-pointer" title="Comment" v-on:click="commentFocus(status, $event)"></h3>
@ -140,6 +140,11 @@
recommended: { recommended: {
type: Boolean, type: Boolean,
default: false default: false
},
reactionBar: {
type: Boolean,
default: true
} }
}, },