diff --git a/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift b/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift index 54cc59b..ae80d7c 100644 --- a/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift +++ b/AIStudyApp/AIStudyApp/Features/Library/LibrarySubpages.swift @@ -144,13 +144,15 @@ struct LibraryDetailPage: View { @State private var detailTab = 1 private func appear() async { + // Load KB info and sources + viewModel.knowledgeBase = try? await KnowledgeBaseService.shared.detail(id: knowledgeBaseId) await loadSources() } @State private var sortOption = 0 @State private var showFolderManager = false @State private var sources: [KnowledgeSource] = [] @State private var sourceReadingStatus: [String: String] = [:] - @State private var isLoadingSources = false + @State private var isLoadingSources = true private var allSelected: Bool { !viewModel.items.isEmpty && selectedIds.count == viewModel.items.count