Extract settings from database

This commit is contained in:
Andras Schmelczer 2025-02-19 21:32:40 +00:00
commit 614e4a780a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -2,7 +2,7 @@ import type { IconName, WorkspaceLeaf } from "obsidian";
import { ItemView, setIcon } from "obsidian";
import { intlFormatDistance } from "date-fns";
import type { SyncHistory, HistoryEntry, Database } from "sync-client";
import type { SyncHistory, HistoryEntry, Settings } from "sync-client";
import { SyncType, SyncSource, SyncStatus, Logger } from "sync-client";
export class HistoryView extends ItemView {
@ -12,7 +12,7 @@ export class HistoryView extends ItemView {
public constructor(
leaf: WorkspaceLeaf,
private readonly database: Database,
private readonly settings: Settings,
private readonly history: SyncHistory
) {
super(leaf);
@ -101,7 +101,7 @@ export class HistoryView extends ItemView {
.filter(
(entry) =>
entry.status !== SyncStatus.NO_OP ||
this.database.getSettings().displayNoopSyncEvents
this.settings.getSettings().displayNoopSyncEvents
);
entries.forEach((entry) => {