Skip to content

Commit

Permalink
refactor: remove unused collectCorpusIdsInFolder
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Jan 20, 2025
1 parent d72f647 commit c7eea5b
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions app/scripts/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import statemachine from "@/statemachine"
import * as authenticationProxy from "@/components/auth/auth"
import { initLocales } from "@/data_init"
import { RootScope } from "@/root-scope.types"
import { Folder } from "./settings/config.types"
import { CorpusTransformed } from "./settings/config-transformed.types"
import { getService, html } from "@/util"
import { loc, locObj } from "@/i18n"
Expand Down Expand Up @@ -184,22 +183,6 @@ korpApp.run([

s.waitForLogin = false

/** Recursively collect the corpus ids found in a corpus folder */
function collectCorpusIdsInFolder(folder: Folder): string[] {
if (!folder) return []

// Collect direct child corpora
const ids = folder.corpora || []

// Recurse into subfolders and add
const subfolders = folder.subfolders || {}
for (const subfolder of Object.values(subfolders)) {
ids.push(...collectCorpusIdsInFolder(subfolder))
}

return ids
}

async function initializeCorpusSelection(selectedIds: string[]): Promise<void> {
// Resolve any folder ids to the contained corpus ids
selectedIds = selectedIds.flatMap((id) => getAllCorporaInFolders(settings.folders, id))
Expand Down

0 comments on commit c7eea5b

Please sign in to comment.