From 9973542ba47185b6ca4c9a243c6c8c79416cd328 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Sat, 4 Jan 2025 17:38:02 +0000 Subject: [PATCH] Formatting --- plugin/src/sync-operations/syncer.ts | 5 +++-- plugin/src/views/logs-view.ts | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/plugin/src/sync-operations/syncer.ts b/plugin/src/sync-operations/syncer.ts index ce566304..15abec74 100644 --- a/plugin/src/sync-operations/syncer.ts +++ b/plugin/src/sync-operations/syncer.ts @@ -78,8 +78,9 @@ export class Syncer { public async syncRemotelyUpdatedFile( remoteVersion: components["schemas"]["DocumentVersionWithoutContent"] ): Promise { - await this.syncQueue.add(async () => - this.internalSyncRemotelyUpdatedFile(remoteVersion) + await this.syncQueue.add( + async () => + this.internalSyncRemotelyUpdatedFile(remoteVersion) ); } diff --git a/plugin/src/views/logs-view.ts b/plugin/src/views/logs-view.ts index c94e68d9..4d36fa65 100644 --- a/plugin/src/views/logs-view.ts +++ b/plugin/src/views/logs-view.ts @@ -91,9 +91,9 @@ export class LogsView extends ItemView { logsContainer = container.createDiv( { cls: "logs-container" }, - (logsContainer) => { - logs.slice(-100).forEach((message) => - logsContainer.createDiv( + (element) => { + logs.forEach((message) => + element.createDiv( { cls: ["log-message", message.level], }, @@ -113,7 +113,7 @@ export class LogsView extends ItemView { } ); - if (scrollPosition) { + if (scrollPosition !== undefined) { logsContainer.scrollTop = scrollPosition; } else { logsContainer.scrollTop = logsContainer.scrollHeight;