Use inlined sync history

This commit is contained in:
Andras Schmelczer 2025-03-20 21:00:54 +00:00
parent e6563c99b0
commit 03d0b7e025
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ export class HistoryView extends ItemView {
super(leaf);
this.icon = HistoryView.ICON;
this.client.history.addSyncHistoryUpdateListener(() => {
this.client.addSyncHistoryUpdateListener(() => {
this.updateView().catch((_error: unknown) => {
this.client.logger.error("Failed to update history view");
});
@ -93,7 +93,7 @@ export class HistoryView extends ItemView {
container.empty();
container.createEl("h4", { text: "VaultLink History" });
const entries = this.client.history.getEntries().reverse();
const entries = this.client.getHistoryEntries().reverse();
entries.forEach((entry) => {
container.createDiv(
{

View file

@ -12,7 +12,7 @@ export class StatusBar {
private readonly syncClient: SyncClient
) {
this.statusBarItem = plugin.addStatusBarItem();
this.syncClient.history.addSyncHistoryUpdateListener((status) => {
this.syncClient.addSyncHistoryUpdateListener((status) => {
this.lastHistoryStats = status;
this.updateStatus();
});

View file

@ -14,7 +14,7 @@ export class StatusDescription {
public constructor(private readonly syncClient: SyncClient) {
void this.updateConnectionState();
syncClient.history.addSyncHistoryUpdateListener((status) => {
syncClient.addSyncHistoryUpdateListener((status) => {
this.lastHistoryStats = status;
this.updateDescription();
});