From 0e178a3371a4cc912066d4cb0390bfa01ac3a79c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 25 Jul 2021 03:33:47 -0600 Subject: [PATCH] Update NotifcationCard.vue component, add refresh button for cold notification cache --- resources/assets/js/components/NotificationCard.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/NotificationCard.vue b/resources/assets/js/components/NotificationCard.vue index 3648df8d6..1d2e7f559 100644 --- a/resources/assets/js/components/NotificationCard.vue +++ b/resources/assets/js/components/NotificationCard.vue @@ -90,6 +90,7 @@

No notifications yet

+

Refresh

@@ -110,7 +111,9 @@ profile: { locked: false }, - followRequests: null + followRequests: null, + showRefresh: false, + attemptedRefresh: false }; }, @@ -152,6 +155,9 @@ this.notificationMaxId = Math.min(...ids); this.notifications = data; this.loading = false; + if(data.length == 0 && !this.attemptedRefresh) { + this.showRefresh = true; + } //this.notificationPoll(); }); }, @@ -307,6 +313,11 @@ } return '/i/web/post/_/' + status.account.id + '/' + status.id; + }, + + refreshNotifications() { + this.attemptedRefresh = true; + this.fetchNotifications(); } } }