mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-28 19:55:53 +03:00
groups: fix notification order
This commit is contained in:
parent
a38d5db9e3
commit
952a05a901
@ -66,7 +66,7 @@ export function Notification(props: {
|
||||
const key = `${harkLidToId(lid)}-${harkBinToId(notification.bin)}`;
|
||||
const history = useHistory();
|
||||
|
||||
const isMobile = useLocalState((s) => s.mobile);
|
||||
const isMobile = useLocalState(s => s.mobile);
|
||||
|
||||
const onArchive = useCallback(
|
||||
async (e) => {
|
||||
@ -80,8 +80,10 @@ export function Notification(props: {
|
||||
);
|
||||
|
||||
const { hovering, bind } = useHovering();
|
||||
const dedupedBody = uniqBy(notification.body, (item) => item.link);
|
||||
const contents = map(dedupedBody, 'content').filter((c) => c.length > 0);
|
||||
const dedupedBody = uniqBy(notification.body, item => item.link);
|
||||
// @ts-ignore TODO fix HarkBody definition for time, is string, should be number.
|
||||
const orderedByTime = dedupedBody.sort((a, b) => b.time - a.time);
|
||||
const contents = map(orderedByTime, 'content').filter(c => c.length > 0);
|
||||
const first = notification.body[0];
|
||||
if (!first) {
|
||||
// should be unreachable
|
||||
|
Loading…
Reference in New Issue
Block a user