-
Notifications
You must be signed in to change notification settings - Fork 35
View lessons with theory #338
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
Conversation
Add: - Fetch steps from an API - Obtain steps from cache
Create RouterPoppable protocol and conform BaseRouter to this protocol.
Introduce: - StepsPagerDataSource - StepsPagerPresenter - StepsPagerRouter - StepsPagerView
@kvld, мы решили дождаться твоего авторитетного мнения :) |
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.
Возникает много вопросов насчет целесообразности использования роутера и typed notifications, но в целом, если убрать сомнения насчет лишних усложнений, норм.
Также не нравится то, что у нас в проекте три(!) различных реализации контроллера для степа, это неоправданно много и надо с этим точно что-то делать.
Ждем комментариев от Влада, в общем.
|
||
SVProgressHUD.setDefaultMaskType(.clear) | ||
SVProgressHUD.setMinimumDismissTimeInterval(0.5) | ||
SVProgressHUD.setHapticsEnabled(true) |
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.
ого, не знал что они это подвезли
Я подумал насчет роутера. Можно все значительно упростить:
Все будет намного проще, в одном месте и понятно. |
TypedNotifications привнес из этого эпизода. Я согласен, что возможно это нам и не нужно.
Подписка на изменения:
Отправка:
Необходимое для работы:
|
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.
Типизированные нотификации – это хорошо, на самом деле, но я бы не стал завозить их сейчас, потому что это затрагивает основное приложение (а внедрить везде мы их не сможем).
Да и саму реализацию я бы тоже обсудил: возможно, не стоит отделять дескриптор и пейлоад, а просто делать для каждой нотификации отдельную сущность.
Предлагаю пока отказаться от них и постить по-старому.
Про роутинг: мне кажется, что не стоит много времени на это уделять. Здесь все равно ничего сложного нет и выигрыша от того или иного решения не получаем ведь.
return .value([]) | ||
} | ||
|
||
return firstly { |
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.
Тут нужен firstly
?
Stepic/StepTabView.swift
Outdated
override func setupSubviews() { | ||
NotificationCenter.default.addObserver(self, selector: #selector(StepTabView.stepDone(_:)), name: NSNotification.Name(rawValue: StepDoneNotificationKey), object: nil) | ||
token = NotificationCenter.default.addObserver(descriptor: Step.progressNotification) { [weak self] payload in | ||
guard let `self` = self, |
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.
strongSelf
return configuration | ||
}() | ||
|
||
var didFinishNavigation: (_ navigation: WKNavigation) -> Void = { _ in } |
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.
Можно сделать optional оба поля.
От нотификаций отказался в PR с практическими заданиями, теперь все прозрачно. |
@kvld @Ostrenkiy внёс изменения. |
Задача: #1959
Описание:
Добавлена возможность просматривать уроки с теорией.