From 29cb7262bc3de3fb7f40cd05db4b9cccf6e8e414 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 22 Feb 2026 15:33:49 -0800 Subject: [PATCH] sonar --- .../document-detail/document-detail.component.ts | 4 ++-- .../src/app/services/websocket-status.service.ts | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index 341bb030e..ac57eb2eb 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -215,7 +215,7 @@ export class DocumentDetailComponent private componentRouterService = inject(ComponentRouterService) private deviceDetectorService = inject(DeviceDetectorService) private savedViewService = inject(SavedViewService) - private websocketStatusService = inject(WebsocketStatusService) + private readonly websocketStatusService = inject(WebsocketStatusService) @ViewChild('inputTitle') titleInput: TextComponent @@ -503,7 +503,7 @@ export class DocumentDetailComponent let formattedModified = null if (modified) { const parsed = new Date(modified) - if (!isNaN(parsed.getTime())) { + if (!Number.isNaN(parsed.getTime())) { formattedModified = parsed.toLocaleString() } } diff --git a/src-ui/src/app/services/websocket-status.service.ts b/src-ui/src/app/services/websocket-status.service.ts index 274f89a02..9e09522b7 100644 --- a/src-ui/src/app/services/websocket-status.service.ts +++ b/src-ui/src/app/services/websocket-status.service.ts @@ -102,19 +102,20 @@ export enum UploadState { providedIn: 'root', }) export class WebsocketStatusService { - private settingsService = inject(SettingsService) + private readonly settingsService = inject(SettingsService) private statusWebSocket: WebSocket private consumerStatus: FileStatus[] = [] - private documentDetectedSubject = new Subject() - private documentConsumptionFinishedSubject = new Subject() - private documentConsumptionFailedSubject = new Subject() - private documentDeletedSubject = new Subject() - private documentUpdatedSubject = + private readonly documentDetectedSubject = new Subject() + private readonly documentConsumptionFinishedSubject = + new Subject() + private readonly documentConsumptionFailedSubject = new Subject() + private readonly documentDeletedSubject = new Subject() + private readonly documentUpdatedSubject = new Subject() - private connectionStatusSubject = new Subject() + private readonly connectionStatusSubject = new Subject() private get(taskId: string, filename?: string) { let status =