| | |
| | | let summary: SmartStartSummary? |
| | | } |
| | | |
| | | struct AppLibraryUncategorizedResetResult { |
| | | let snapshot: AppLibrarySnapshot |
| | | } |
| | | |
| | | enum AppLibraryController { |
| | | static func refresh(useCache: Bool = true) -> AppLibraryRefreshResult { |
| | | let scannedApps = AppIndexer.scan(useCache: useCache) |
| | |
| | | ) |
| | | } |
| | | |
| | | static func resetToUncategorized() -> AppLibraryUncategorizedResetResult { |
| | | let scannedApps = AppIndexer.scan(useCache: false) |
| | | let store = TagDatabase.resetAppTagAssignmentsToUncategorized() |
| | | return AppLibraryUncategorizedResetResult( |
| | | snapshot: makeSnapshot(scannedApps: scannedApps, store: store) |
| | | ) |
| | | } |
| | | |
| | | private static func makeSnapshot( |
| | | scannedApps: [AppInfo], |
| | | store: TagDatabase.Store |