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

Fix crash when navigate to prev/next lesson #172

Merged
merged 7 commits into from
Nov 15, 2017
Merged

Fix crash when navigate to prev/next lesson #172

merged 7 commits into from
Nov 15, 2017

Conversation

kvld
Copy link
Contributor

@kvld kvld commented Nov 10, 2017

Задача: #APPS-1629, #APPS-1647

Коротко для Release Notes, в формате «Сделали/Добавили/Исправили N»:
Исправили краш при переходе к экзамену и к пустому модулю с кнопки "Следующий урок"

Описание:

  • При переходе к экзамену: добавили проверку на то, что следующая секция имеет isExam == true и показываем алерт (как в силлабусе).
  • При переходе к пустому модулю: смотрим на кол-во юнитов в следующей секции

@kvld kvld added this to the 1.47 milestone Nov 10, 2017
@kvld kvld self-assigned this Nov 10, 2017
@kvld kvld requested a review from Ostrenkiy November 10, 2017 17:00
Copy link
Contributor

@Ostrenkiy Ostrenkiy left a comment

Choose a reason for hiding this comment

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

Не очень мне нравится, что в goToNextSection() и goToPrevSection() очень много кода дублируется. Мб можно попробовать общую логику вынести куда-нибудь в отдельное место?

@@ -335,12 +341,43 @@ class UnitsViewController: UIViewController, ShareableController, UIViewControll
}

self.section = prevSection

// Exam
guard !prevSection.isExam else {
Copy link
Contributor

Choose a reason for hiding this comment

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

нормально, что это находится после self.section = prevSection ?

kvld added 3 commits November 14, 2017 12:55

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@kvld kvld changed the title Fix crash when prev/next section is exam Fix crash when navigate to prev/next lesson Nov 14, 2017
@kvld
Copy link
Contributor Author

kvld commented Nov 14, 2017

@Ostrenkiy там нет какой-то слишком интеллектуальной логики, думаешь нужно?

@Ostrenkiy
Copy link
Contributor

нет, давай так оставим

@kvld kvld merged commit d23b56e into dev Nov 15, 2017
@kvld kvld deleted the fix/crash-exam branch November 15, 2017 13:01
@Ostrenkiy Ostrenkiy mentioned this pull request Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants