Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Refactor/lab5 #6

wants to merge 7 commits into from

Conversation

abiteev-ae
Copy link
Owner

No description provided.

case showDescriptionScreen(Model)
case changeTriangleColor(Model)
}

Copy link
Owner Author

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:
Copy link
Owner Author

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)

Comment on lines 69 to 73

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}

Copy link
Owner Author

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")
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

Comment on lines +159 to +166
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)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless

Comment on lines +152 to +159
enum CodingKeys: String, CodingKey {
case offset = "offset"
case limit = "limit"
case total = "total"
case count = "count"
case results = "results"
}
init(from decoder: Decoder) throws {
Copy link
Owner Author

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 {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DiffableDataSource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant