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:
parent
dff8eca16e
commit
a6f1eaa09e
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🐌",
|
||||
"previous": "&dc3Eovh35uB024L4dyFX+n8N37ove9STsKmkKlO/pcQ=.sha256"
|
||||
"previous": "&vIYnoUkbz97WRvyunV+ETe+Y6tJk7tTEVvgYuwkoDiM=.sha256"
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user