mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-23 13:45:33 +02:00
♻️ Simplify expressiono
This commit is contained in:
parent
168fe94391
commit
ee46f2a33e
@ -91,11 +91,9 @@ export default {
|
|||||||
this.notifications = [];
|
this.notifications = [];
|
||||||
notifications.forEach((notification) => {
|
notifications.forEach((notification) => {
|
||||||
if (limitCount && this.notifications.length === limitCount) return; // count limit
|
if (limitCount && this.notifications.length === limitCount) return; // count limit
|
||||||
const notiDate = Date.parse(notification.datetime);
|
const notiTime = Date.parse(notification.datetime);
|
||||||
const now = new Date().getTime();
|
const nowTime = new Date().getTime();
|
||||||
if (limitTime && notiDate && now - notiDate > limitTime) { // time limit
|
if (limitTime && notiTime && nowTime - notiTime > limitTime) return; // time limit
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.notifications.push(notification);
|
this.notifications.push(notification);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user