-
Notifications
You must be signed in to change notification settings - Fork 66
iOS-5387 Space View | improve diff #4189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS-5387 Space View | improve diff #4189
Conversation
Bugs/IssuesSpaceHubViewModel.swift:217 - Recommendation: Make private func updateFilteredSpaces() {
Task {
guard let spaces else {
filteredSpaces = []
return
}
let spacesToFilter: [ParticipantSpaceViewDataWithPreview]
if searchText.isEmpty {
spacesToFilter = spaces
} else {
spacesToFilter = spaces.filter { space in
space.spaceView.name.localizedCaseInsensitiveContains(searchText)
}
}
self.filteredSpaces = await spaceCardModelBuilder.build(from: spacesToFilter, wallpapers: wallpapers)
}
}Then call it without await: SpaceHubDropDelegate.swift:20 - Incorrect property access after refactoring Line 29 has the same issue: This will cause a compilation error - Fix: Change lines 28-29 to: guard let fromIndex = allSpaces.firstIndex(where: { $0.spaceView.id == draggedSpaceViewId } ) else { return }
guard let toIndex = allSpaces.firstIndex(where: { $0.spaceView.id == destinationSpaceViewId } ) else { return }Best PracticesView+DragDrop.swift:46, 66, 85 - Redundant Recommendation: Remove SpaceHubList.swift:82 - Unnecessary SpaceCard.swift:15-16 - Feature flags stored in @State 🚨 Major Issues - Compilation error in SpaceHubDropDelegate.swift lines 28-29, and potential performance issue with async/await pattern |
No description provided.