Skip to content

HomeWork - Домашнее задание по корутинам#273

Open
BambinoGrandi wants to merge 3 commits intoOtus-Android:developmentfrom
BambinoGrandi:home_work
Open

HomeWork - Домашнее задание по корутинам#273
BambinoGrandi wants to merge 3 commits intoOtus-Android:developmentfrom
BambinoGrandi:home_work

Conversation

@BambinoGrandi
Copy link
Copy Markdown

Описание

  • Выполнено домашнее задание
  • Рефакторинг Callback на suspend-функции
  • Добавлен запрос loadImage() для получения картинки
  • В CatsPresnter добавлена функция load() для загрузки фактов с сети с помощью корутин
  • Реализована CatsViewModel

imageUrl = imageUrl,
)
}.onFailure { error ->
_catsFact.update {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

также перехват CancellationException

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

исправил

val facts = catsService.getCatFact()
_catsView?.populate(CatFact(facts))
} catch (e: Exception) {
errorHandler(e)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

вот тут еще остался перехват CancellationException

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.

2 participants