mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-21 05:18:51 +01:00
Fix notifications grouping bug
This commit is contained in:
parent
ed8fce3cbf
commit
3d2b7f683c
1 changed files with 3 additions and 3 deletions
|
@ -445,9 +445,9 @@ function groupNotifications(notifications) {
|
||||||
const cleanNotifications = [];
|
const cleanNotifications = [];
|
||||||
for (let i = 0, j = 0; i < notifications.length; i++) {
|
for (let i = 0, j = 0; i < notifications.length; i++) {
|
||||||
const notification = notifications[i];
|
const notification = notifications[i];
|
||||||
const { status, account, type, created_at } = notification;
|
const { status, account, type, createdAt } = notification;
|
||||||
const createdAt = new Date(created_at).toLocaleDateString();
|
const date = new Date(createdAt).toLocaleDateString();
|
||||||
const key = `${status?.id}-${type}-${createdAt}`;
|
const key = `${status?.id}-${type}-${date}`;
|
||||||
const mappedNotification = notificationsMap[key];
|
const mappedNotification = notificationsMap[key];
|
||||||
if (mappedNotification?.account) {
|
if (mappedNotification?.account) {
|
||||||
mappedNotification._accounts.push(account);
|
mappedNotification._accounts.push(account);
|
||||||
|
|
Loading…
Reference in a new issue