diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-01-17 16:25:10 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2023-01-17 16:25:10 -0600 |
commit | 90ac2fe1fcd4410e8d4768312481ab8fb5f65314 (patch) | |
tree | b225b507b76f931c369ecb16f6acdd17c40a6570 | |
parent | 5a5835f561b3285a7940a7df901c70787740abf2 (diff) | |
download | voidsky-90ac2fe1fcd4410e8d4768312481ab8fb5f65314.tar.zst |
Group together notifications more aggressively
-rw-r--r-- | src/state/models/notifications-view.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index c4d2b2dfa..bbd7c8080 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -14,7 +14,8 @@ import {cleanError} from '../../lib/strings' const UNGROUPABLE_REASONS = ['assertion'] const PAGE_SIZE = 30 -const MS_60MIN = 1e3 * 60 * 60 +const MS_1HR = 1e3 * 60 * 60 +const MS_2DAY = MS_1HR * 48 let _idCounter = 0 @@ -447,7 +448,7 @@ function groupNotifications( for (const item2 of items2) { const ts2 = +new Date(item2.indexedAt) if ( - Math.abs(ts2 - ts) < MS_60MIN && + Math.abs(ts2 - ts) < MS_2DAY && item.reason === item2.reason && item.reasonSubject === item2.reasonSubject && item.author.did !== item2.author.did |