File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed
SwiftUI-WorkoutApp/Screens/SportsGrounds/List Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ final class SportsGroundListViewModel: ObservableObject {
1313 let isMainUser = userID == defaults. mainUserID
1414 let needUpdate = list. isEmpty || refresh
1515 if isMainUser {
16- #warning("TODO: вместо needUpdateUser проверять список площадок пользователя в БД, чтобы не делать лишние запросы")
1716 if !needUpdate && !defaults. needUpdateUser { return }
1817 isLoading. toggle ( )
1918 await makeList ( for: userID, with: defaults)
@@ -29,7 +28,6 @@ final class SportsGroundListViewModel: ObservableObject {
2928 }
3029
3130 func deleteSportsGround( id: Int ) {
32- #warning("TODO: обновлять список добавленных пользователем площадок в БД")
3331 list. removeAll ( where: { $0. id == id } )
3432 }
3533
@@ -40,7 +38,6 @@ private extension SportsGroundListViewModel {
4038 func makeList( for userID: Int , with defaults: DefaultsService ) async {
4139 do {
4240 if userID == defaults. mainUserID {
43- #warning("TODO: интеграция с БД")
4441 defaults. setUserNeedUpdate ( false )
4542 }
4643 list = try await APIService ( with: defaults) . getSportsGroundsForUser ( userID)
You can’t perform that action at this time.
0 commit comments