Ariver
2026-05-30 e47223fbd1a6ec0c1ea417d36c4eff1feee93b81
Apptag/AppLibraryController.swift
@@ -17,6 +17,11 @@
    let summary: SmartStartSummary?
}
struct AppLibrarySystemSchemeApplyResult {
    let snapshot: AppLibrarySnapshot
    let summary: SmartStartSummary?
}
enum AppLibraryController {
    static func refresh() -> AppLibraryRefreshResult {
        let scannedApps = AppIndexer.scan()
@@ -42,6 +47,15 @@
        )
    }
    static func applySystemInitialScheme() -> AppLibrarySystemSchemeApplyResult {
        let scannedApps = AppIndexer.scan(useCache: false)
        let result = SmartStartService.applySystemInitialScheme(apps: scannedApps)
        return AppLibrarySystemSchemeApplyResult(
            snapshot: makeSnapshot(scannedApps: scannedApps, store: result.store),
            summary: result.summary
        )
    }
    private static func makeSnapshot(
        scannedApps: [AppInfo],
        store: TagDatabase.Store