瀏覽代碼

Update Timeline.vue, fix notification bug

Daniel Supernault 6 年之前
父節點
當前提交
661e60027e
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      resources/assets/js/components/Timeline.vue

+ 6 - 1
resources/assets/js/components/Timeline.vue

@@ -450,7 +450,12 @@
 			fetchNotifications() {
 				axios.get('/api/v1/notifications')
 				.then(res => {
-					this.notifications = res.data;
+					this.notifications = res.data.filter(n => {
+						if(n.type == 'share' && !status) {
+							return false;
+						}
+						return true;
+					});
 					$('.notification-card .loader').addClass('d-none');
 					$('.notification-card .contents').removeClass('d-none');
 				});