Update StatusTransformers

This commit is contained in:
Daniel Supernault 2019-09-30 22:38:52 -06:00
parent 6ef7597356
commit 9528d97c0a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 8 additions and 8 deletions

View file

@ -28,8 +28,8 @@ class StatusTransformer extends Fractal\TransformerAbstract
'created_at' => $status->created_at->toJSON(),
'emojis' => [],
'replies_count' => 0,
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),
'reblogs_count' => $status->reblogs_count,
'favourites_count' => $status->likes_count,
'reblogged' => null,
'favourited' => null,
'muted' => null,

View file

@ -25,8 +25,8 @@ class StatusTransformer extends Fractal\TransformerAbstract
'content' => $status->rendered ?? $status->caption,
'created_at' => $status->created_at->format('c'),
'emojis' => [],
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(),
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(),
'reblogs_count' => $status->reblogs_count,
'favourites_count' => $status->likes_count,
'reblogged' => $status->shared(),
'favourited' => $status->liked(),
'muted' => null,

View file

@ -304,7 +304,7 @@
</div>
</div>
<div v-show="modes.notify == true" class="mb-4">
<div v-show="modes.notify == true && !loading" class="mb-4">
<notification-card></notification-card>
</div>
@ -606,9 +606,9 @@
this.max_id = Math.min(...ids);
this.loading = false;
$('.timeline .pagination').removeClass('d-none');
if(this.feed.length == 4) {
this.fetchTimelineApi();
}
// if(this.feed.length == 4) {
// this.fetchTimelineApi();
// }
if(this.hashtagPosts.length == 0) {
this.fetchHashtagPosts();
}