mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 10:02:47 +03:00
link-store: ensure latest-first ordering of state
We may %hear or %read content that was posted some time ago, so we need to make sure we add it at the appropriate position (wrt timestamp) rather than just sticking it at the head of the list.
This commit is contained in:
parent
bf789b987c
commit
583c3dc364
@ -320,7 +320,8 @@
|
||||
:: add link to group submissions
|
||||
::
|
||||
=/ =links (~(gut by by-group) path *links)
|
||||
=. submissions.links [submission submissions.links]
|
||||
=. submissions.links
|
||||
(submissions:merge submissions.links ~[submission])
|
||||
=. by-group (~(put by by-group) path links)
|
||||
:: add submission to global sites
|
||||
::
|
||||
@ -345,7 +346,8 @@
|
||||
::
|
||||
=/ urls (~(gut by discussions) path *(map ^url discussion))
|
||||
=/ =discussion (~(gut by urls) url *discussion)
|
||||
=. comments.discussion [comment comments.discussion]
|
||||
=. comments.discussion
|
||||
(comments:merge comments.discussion ~[comment])
|
||||
=. urls (~(put by urls) url discussion)
|
||||
=. discussions (~(put by discussions) path urls)
|
||||
:: send updates to subscribers
|
||||
|
Loading…
Reference in New Issue
Block a user