mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 13:06:09 +03:00
chat-view: limit initial scrollback to 25 msgs
Provided "load backlog on-scroll" actually works, you don't really need all that much on initial load.
This commit is contained in:
parent
64a693a037
commit
376af254af
@ -109,6 +109,8 @@
|
||||
[[%give %fact ~ %json !>(*json)]~ this]
|
||||
(on-watch:def path)
|
||||
::
|
||||
++ message-limit 25
|
||||
::
|
||||
++ truncated-inbox-scry
|
||||
^- inbox
|
||||
=/ =inbox .^(inbox %gx /=chat-store/(scot %da now.bol)/all/noun)
|
||||
@ -121,9 +123,9 @@
|
||||
|= envelopes=(list envelope)
|
||||
^- (list envelope)
|
||||
=/ length (lent envelopes)
|
||||
?: (lth length 100)
|
||||
?: (lth length message-limit)
|
||||
envelopes
|
||||
(swag [(sub length 100) 100] envelopes)
|
||||
(slag (sub length message-limit) envelopes)
|
||||
--
|
||||
::
|
||||
++ on-agent
|
||||
|
Loading…
Reference in New Issue
Block a user