Skip to content

Commit 6759350

Browse files
committed
Refactor async loading of section order and filter settings
Replaces concurrent async let loading of section order and filter settings with sequential awaits. This change simplifies the code and may improve readability and error handling.
1 parent 0526860 commit 6759350

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Sources/App/WebView/ExperimentalSpace/Home/HomeViewModel.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,8 @@ final class HomeViewModel: ObservableObject {
4444
let loadedHiddenEntities = await EntityDisplayService.loadHiddenEntities(for: server)
4545
hiddenEntityIds = loadedHiddenEntities
4646

47-
async let sectionOrderLoad: Void = loadSectionOrderIfNeeded()
48-
async let filterSettingsLoad: Void = loadFilterSettingsIfNeeded()
49-
50-
await sectionOrderLoad
51-
await filterSettingsLoad
47+
await loadSectionOrderIfNeeded()
48+
await loadFilterSettingsIfNeeded()
5249

5350
// Subscribe to entity changes first - sections will be built when data arrives
5451
subscribeToEntitiesChanges()

0 commit comments

Comments
 (0)