From e32a8c76bd6752ba350ead132faeae0a47d082e2 Mon Sep 17 00:00:00 2001 From: everoddandeven Date: Fri, 1 Nov 2024 11:51:47 +0100 Subject: [PATCH] Try fix tables --- src/app/pages/network/network.component.ts | 2 ++ src/app/pages/peers/peers.component.ts | 7 ++++++- src/app/pages/transactions/transactions.component.ts | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/app/pages/network/network.component.ts b/src/app/pages/network/network.component.ts index 60e9080..bc5b8f0 100644 --- a/src/app/pages/network/network.component.ts +++ b/src/app/pages/network/network.component.ts @@ -63,6 +63,8 @@ export class NetworkComponent extends BasePageComponent implements AfterViewInit this.netStatsBytesOutChart.destroy(); this.netStatsBytesOutChart = undefined; } + + this.destroyTables(); } else { this.initNetStatsHistoryChart(); diff --git a/src/app/pages/peers/peers.component.ts b/src/app/pages/peers/peers.component.ts index ce58914..85fd9dc 100644 --- a/src/app/pages/peers/peers.component.ts +++ b/src/app/pages/peers/peers.component.ts @@ -51,8 +51,13 @@ export class PeersComponent extends BasePageComponent implements AfterViewInit { const sub: Subscription = this.daemonData.syncEnd.subscribe(() => { this.loadPublicNodesTable(); }); + + const statusSub: Subscription = this.daemonService.onDaemonStatusChanged.subscribe((running: boolean) => { + if (running) this.loadTables(); + else this.destroyTables(); + }); - this.subscriptions.push(sub); + this.subscriptions.push(sub, statusSub); }); } diff --git a/src/app/pages/transactions/transactions.component.ts b/src/app/pages/transactions/transactions.component.ts index ddb4bcd..ff20b63 100644 --- a/src/app/pages/transactions/transactions.component.ts +++ b/src/app/pages/transactions/transactions.component.ts @@ -109,7 +109,16 @@ export class TransactionsComponent extends BasePageComponent implements AfterVie const onSyncEndSub: Subscription = this.daemonData.syncEnd.subscribe(() => this.refresh()); - this.subscriptions.push(onSyncEndSub); + const statusSub: Subscription = this.daemonService.onDaemonStatusChanged.subscribe((running: boolean) => { + if (running) { + this.loadTables(); + } + else { + this.destroyTables(); + } + }); + + this.subscriptions.push(onSyncEndSub, statusSub); }); }