Skip to content

Commit b7a064c

Browse files
committed
Рефактор
Убрал лишние ворнинги
1 parent ebf9889 commit b7a064c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

SwiftUI-WorkoutApp/Screens/SportsGrounds/List/SportsGroundListViewModel.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)