From df203958db17ca7f514d4944aaf3575fcf231e83 Mon Sep 17 00:00:00 2001 From: Anass Bouassaba Date: Thu, 21 Nov 2024 13:37:15 +0100 Subject: [PATCH] fix: linter errors (#1) --- Sources/Screens/Organization/OrganizationSettings.swift | 4 +++- Sources/Screens/Snapshot/SnapshotStore.swift | 8 +++++++- Sources/Screens/Workspace/WorkspaceSettings.swift | 4 +++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Sources/Screens/Organization/OrganizationSettings.swift b/Sources/Screens/Organization/OrganizationSettings.swift index 0375b65..8427e2c 100644 --- a/Sources/Screens/Organization/OrganizationSettings.swift +++ b/Sources/Screens/Organization/OrganizationSettings.swift @@ -35,7 +35,9 @@ struct OrganizationSettings: View { NavigationLink { OrganizationEditName(organizationStore: organizationStore) { updatedOranization in organizationStore.current = updatedOranization - if let index = organizationStore.entities?.firstIndex(where: { $0.id == updatedOranization.id }) { + if let index = organizationStore.entities?.firstIndex(where: { + $0.id == updatedOranization.id + }) { organizationStore.entities?[index] = updatedOranization } } diff --git a/Sources/Screens/Snapshot/SnapshotStore.swift b/Sources/Screens/Snapshot/SnapshotStore.swift index 9d1ae42..37571e9 100644 --- a/Sources/Screens/Snapshot/SnapshotStore.swift +++ b/Sources/Screens/Snapshot/SnapshotStore.swift @@ -47,7 +47,13 @@ class SnapshotStore: ObservableObject { private func fetchList(page: Int = 1, size: Int = Constants.pageSize) async throws -> VOSnapshot.List? { guard let fileID else { return nil } - return try await snapshotClient?.fetchList(.init(fileID: fileID, page: page, size: size, sortBy: .version, sortOrder: .desc)) + return try await snapshotClient?.fetchList(.init( + fileID: fileID, + page: page, + size: size, + sortBy: .version, + sortOrder: .desc + )) } func fetchNext(replace: Bool = false) { diff --git a/Sources/Screens/Workspace/WorkspaceSettings.swift b/Sources/Screens/Workspace/WorkspaceSettings.swift index e69f68d..8a259fb 100644 --- a/Sources/Screens/Workspace/WorkspaceSettings.swift +++ b/Sources/Screens/Workspace/WorkspaceSettings.swift @@ -56,7 +56,9 @@ struct WorkspaceSettings: View { NavigationLink { WorkspaceEditName(workspaceStore: workspaceStore) { updatedWorkspace in workspaceStore.current = updatedWorkspace - if let index = workspaceStore.entities?.firstIndex(where: { $0.id == updatedWorkspace.id }) { + if let index = workspaceStore.entities?.firstIndex(where: { + $0.id == updatedWorkspace.id + }) { workspaceStore.entities?[index] = updatedWorkspace } }