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(), 'created_at' => $status->created_at->toJSON(),
'emojis' => [], 'emojis' => [],
'replies_count' => 0, 'replies_count' => 0,
'reblogs_count' => $status->reblogs_count != 0 ? $status->reblogs_count: $status->shares()->count(), 'reblogs_count' => $status->reblogs_count,
'favourites_count' => $status->likes_count != 0 ? $status->likes_count: $status->likes()->count(), 'favourites_count' => $status->likes_count,
'reblogged' => null, 'reblogged' => null,
'favourited' => null, 'favourited' => null,
'muted' => null, 'muted' => null,

View file

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

View file

@ -304,7 +304,7 @@
</div> </div>
</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> <notification-card></notification-card>
</div> </div>
@ -606,9 +606,9 @@
this.max_id = Math.min(...ids); this.max_id = Math.min(...ids);
this.loading = false; this.loading = false;
$('.timeline .pagination').removeClass('d-none'); $('.timeline .pagination').removeClass('d-none');
if(this.feed.length == 4) { // if(this.feed.length == 4) {
this.fetchTimelineApi(); // this.fetchTimelineApi();
} // }
if(this.hashtagPosts.length == 0) { if(this.hashtagPosts.length == 0) {
this.fetchHashtagPosts(); this.fetchHashtagPosts();
} }