forked from cory/tildefriends
Put a cap on how many new messages we store browser-side. Unbounded growth is leading to crashed tabs and unresponsiveness.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4638 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -156,6 +156,7 @@ class TfElement extends LitElement {
|
||||
]);
|
||||
if (messages && messages.length) {
|
||||
this.unread = [...this.unread, ...messages];
|
||||
this.unread = this.unread.slice(this.unread.length - 1024);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user