Skip to content

armgit / dashy

Public Imported from GitHub
0

🚀 A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:recycle: Simplify expressiono

Marcell Fülöpee46f2a33e91
diff --git a/src/components/Widgets/NextcloudNotifications.vue b/src/components/Widgets/NextcloudNotifications.vue
index b05c983a..1c2278fe 100644
--- a/src/components/Widgets/NextcloudNotifications.vue
+++ b/src/components/Widgets/NextcloudNotifications.vue
@@ -91,11 +91,9 @@ export default {
this.notifications = [];
notifications.forEach((notification) => {
if (limitCount && this.notifications.length === limitCount) return; // count limit
- const notiDate = Date.parse(notification.datetime);
- const now = new Date().getTime();
- if (limitTime && notiDate && now - notiDate > limitTime) { // time limit
- return;
- }
+ const notiTime = Date.parse(notification.datetime);
+ const nowTime = new Date().getTime();
+ if (limitTime && notiTime && nowTime - notiTime > limitTime) return; // time limit
this.notifications.push(notification);
});
},