ssb: Don't show messages that were slow to load from another channel.
Some checks failed
Build Tilde Friends / Build-All (push) Has been cancelled

This commit is contained in:
2025-08-20 19:38:52 -04:00
parent 61501a9b64
commit 77b1ea1fc8
2 changed files with 5 additions and 2 deletions

View File

@@ -386,6 +386,7 @@ class TfTabNewsFeedElement extends LitElement {
let self = this;
this.loading++;
let messages = [];
let original_hash = this.hash;
try {
if (this._messages_hash !== this.hash) {
this.messages = [];
@@ -407,7 +408,9 @@ class TfTabNewsFeedElement extends LitElement {
} finally {
this.loading--;
}
this.messages = this.merge_messages(this.messages, messages);
if (this.hash == original_hash) {
this.messages = this.merge_messages(this.messages, messages);
}
this.time_loading = undefined;
console.log(
`loading ${messages.length} messages done for ${self.whoami} in ${(new Date() - start_time) / 1000}s`