@@ -318,6 +323,7 @@
min_id: 0,
max_id: 0,
notifications: {},
+ notificationCursor: 2,
stories: {},
suggestions: {},
loading: true,
@@ -438,17 +444,44 @@
fetchNotifications() {
axios.get('/api/v1/notifications')
.then(res => {
- this.notifications = res.data.filter(n => {
+ let data = res.data.filter(n => {
if(n.type == 'share' && !status) {
return false;
}
return true;
});
+ this.notifications = data;
$('.notification-card .loader').addClass('d-none');
$('.notification-card .contents').removeClass('d-none');
});
},
+ infiniteNotifications($state) {
+ if(this.notificationCursor > 10) {
+ $state.complete();
+ return;
+ }
+ axios.get('/api/v1/notifications', {
+ params: {
+ page: this.notificationCursor
+ }
+ }).then(res => {
+ if(res.data.length) {
+ let data = res.data.filter(n => {
+ if(n.type == 'share' && !status) {
+ return false;
+ }
+ return true;
+ });
+ this.notifications.push(...data);
+ this.notificationCursor++;
+ $state.loaded();
+ } else {
+ $state.complete();
+ }
+ });
+ },
+
reportUrl(status) {
let type = status.in_reply_to ? 'comment' : 'post';
let id = status.id;
From b4f0d1586d2c6a85b04ab240ac57126ded78bab2 Mon Sep 17 00:00:00 2001
From: Daniel Supernault
Date: Tue, 26 Feb 2019 00:16:46 -0700
Subject: [PATCH 3/3] Update compiled assets
---
public/js/timeline.js | Bin 33858 -> 34539 bytes
public/mix-manifest.json | Bin 641 -> 641 bytes
2 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/public/js/timeline.js b/public/js/timeline.js
index 9a82de4324cecb8965c3d378764a849b969051a2..5e409d7fdacacb04bd4004efc1b9cd8d3e6b6b55 100644
GIT binary patch
delta 2484
zcma)8ZEPIH8P=Y^u$?2uzThAm=WcN>Gri5`oV20wW-w7Iph;=umV7kpYgpgS#Z#|m
zkDWQ!AGuH`{NO`D39nR9scNIrO6{Mj=~b%Q3PGSkB@%=mAoWLuDj`8drM95{Kp>>P
zb7$u+g-ZRiJNwQ%&%U3}J1;$+`1^#f&THswflgivo?guEsKL)-GSFM6p)hVi2b#
zGa|MsCdH*ABNTUwK^PLbq2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