-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactor/lab5 #6
base: main
Are you sure you want to change the base?
Conversation
case showDescriptionScreen(Model) | ||
case changeTriangleColor(Model) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cell.model:
{
let id: Int
let name: String
let imageURL: String
}
collectionView.model:
{
var items: [cell.model]
}
} | ||
self?.activityIndicatorView.start() | ||
|
||
case .loaded: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case .loaded(let model):
setupCollectionView(model: Model)
|
||
override func viewWillAppear(_ animated: Bool) { | ||
super.viewWillAppear(animated) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
} | ||
if characters.isEmpty || offset != 0 { | ||
closure(.failure(error)) | ||
print("Fuck") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: CodingKeys.self) | ||
|
||
offset = try values.decode(Int.self, forKey: .offset) | ||
limit = try values.decode(Int.self, forKey: .limit) | ||
total = try values.decode(Int.self, forKey: .total) | ||
count = try values.decode(Int.self, forKey: .count) | ||
results = try values.decode([Character].self, forKey: .results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless
enum CodingKeys: String, CodingKey { | ||
case offset = "offset" | ||
case limit = "limit" | ||
case total = "total" | ||
case count = "count" | ||
case results = "results" | ||
} | ||
init(from decoder: Decoder) throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless
@@ -142,63 +199,62 @@ final class HeroListViewController: UIViewController { | |||
} | |||
} | |||
|
|||
extension HeroListViewController: UICollectionViewDataSource, UICollectionViewDelegate { | |||
extension CharactersCollectionViewController: UICollectionViewDataSource, UICollectionViewDelegate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DiffableDataSource
No description provided.