ssb: Show the progress indicator more consistently.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 30m54s

This commit is contained in:
2025-07-31 12:48:45 -04:00
parent c3415ab75c
commit c59fba817d
4 changed files with 16 additions and 2 deletions

View File

@@ -57,6 +57,7 @@ class TfElement extends LitElement {
tfrpc.rpc.getHash().then((hash) => self.set_hash(hash));
tfrpc.register(function hashChanged(hash) {
self.set_hash(hash);
self.reset_progress();
});
tfrpc.register(async function notifyNewMessage(id) {
await self.fetch_new_message(id);
@@ -459,7 +460,9 @@ class TfElement extends LitElement {
}
update_progress() {
if (!this.loading_latest && !this.loading_latest_scheduled) {
if (!this.loading_latest &&
!this.loading_latest_scheduled &&
!this.shadowRoot.getElementById('tf-tab-news')?.is_loading()) {
this.progress = undefined;
return;
}
@@ -622,6 +625,7 @@ class TfElement extends LitElement {
@channelsetunread=${this.channel_set_unread}
@refresh=${this.refresh}
@toggle_stay_connected=${this.toggle_stay_connected}
@loadmessages=${this.reset_progress}
.connections=${this.connections}
.private_messages=${this.private_messages}
.recent_reactions=${this.recent_reactions}