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

Show topic lessons #332

Merged
merged 14 commits into from
Jul 30, 2018
Merged

Show topic lessons #332

merged 14 commits into from
Jul 30, 2018

Conversation

ivan-magda
Copy link
Member

@ivan-magda ivan-magda commented Jul 24, 2018

Задача: #APPS-1974

Описание:
Разбил основную задачу на 2 части. Добавил возможность просматривать список уроков для каждого топика.
В следующем PR будут степы (просмотр теории).

@ivan-magda ivan-magda added this to the 1.64 milestone Jul 24, 2018
@ivan-magda ivan-magda self-assigned this Jul 24, 2018
@ivan-magda ivan-magda requested a review from kvld July 24, 2018 14:45
@ivan-magda ivan-magda changed the title Show topic's lessons Show topic lessons Jul 24, 2018
@ivan-magda ivan-magda requested a review from Ostrenkiy July 24, 2018 14:50
@ivan-magda ivan-magda changed the title Show topic lessons WIP: Show topic lessons Jul 26, 2018
@ivan-magda ivan-magda changed the title WIP: Show topic lessons Show topic lessons Jul 26, 2018
import PromiseKit

final class EnrollmentServiceImpl: EnrollmentService {
private enum EnrollmentServiceError: Error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Из-за приватности нельзя будет проверить, что ошибка принадлежит к EnrollmentServiceError.

self.enrollmentsAPI.joinCourse(course).done {
seal.fulfill(course)
}.catch { _ in
seal.reject(EnrollmentServiceError.joinCourseFailed)
Copy link
Contributor

Choose a reason for hiding this comment

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

Если мы где-то явно не проверяем, что за ошибка произошла при записи на курс, имеет смысл записать тело как return self.enrollmentsAPI.joinCourse(course)

// MARK: - Private API

private func joinCoursesIfNeeded() {
guard !coursesIds.isEmpty else { return }
Copy link
Contributor

Choose a reason for hiding this comment

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

Чтобы guard не сливался с остальным кодом, предлагаю форматировать его как всё остальное (не в одну строку) и отделять пустой строкой после.

@ivan-magda ivan-magda merged commit be21f90 into dev Jul 30, 2018
@ivan-magda ivan-magda deleted the feature/exam-lessons-list branch July 30, 2018 09:56
@Ostrenkiy Ostrenkiy modified the milestones: 1.64, 1.65 Jul 30, 2018
@kvld kvld mentioned this pull request Aug 23, 2018
1 task
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.

3 participants