Trim channel when switching away from it
This commit is contained in:
parent
b963fe3cf0
commit
739d44b561
@ -131,6 +131,7 @@ window.vueMounted = () => {
|
|||||||
|
|
||||||
if (lastChannel.messages.length > 0) {
|
if (lastChannel.messages.length > 0) {
|
||||||
lastChannel.firstUnread = lastChannel.messages[lastChannel.messages.length - 1].id;
|
lastChannel.firstUnread = lastChannel.messages[lastChannel.messages.length - 1].id;
|
||||||
|
lastChannel.messages.splice(0, lastChannel.messages.length - 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user