Use inlined sync history
This commit is contained in:
parent
e6563c99b0
commit
03d0b7e025
3 changed files with 4 additions and 4 deletions
|
|
@ -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(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue