-
Notifications
You must be signed in to change notification settings - Fork 35
Hide language widget after first session #302
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
|
||
@IBOutlet weak var languageLabel: StepikLabel! | ||
|
||
override func awakeFromNib() { |
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.
Пустые методы.
@@ -15,4 +15,5 @@ class DefaultsContainer { | |||
private init() {} | |||
static let launch = LaunchDefaultsContainer() | |||
static let personalDeadlines = PersonalDeadlinesDefaultsContainer() | |||
static let explore = ExploreDefaultsContainer() |
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.
Нужно будет подумать, как сделать аккуратно. Потому что плодим какие-то ненужные сущности, внутри которых один и тот же код с точностью до констант с ключами.
Stepic/SettingsPresenter.swift
Outdated
|
||
private func buildTitleMenuBlock(id: String, title: String) -> HeaderMenuBlock { | ||
return HeaderMenuBlock(id: id, title: title) | ||
enum BlockID: String { |
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.
Предлагаю сделать как в Profile --- делать инициализацию блоков во вью слое, а если надо иметь какую-то логику, то иметь ее в презентере.
@@ -16,6 +16,7 @@ class DefaultsStorageManager { | |||
private let accountEmailKey = "account_email" | |||
private let accountPasswordKey = "account_password" | |||
private let lastCourseIdKey = "last_course_id" | |||
|
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.
🤔
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.
ну, добавился отступ лишний, бывает)
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.
Так лучше, но лишнюю реализацию equatable можно попробовать убрать.
Stepic/SettingsMenuBlock.swift
Outdated
|
||
import Foundation | ||
|
||
enum SettingsMenuBlock: String, Equatable { |
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.
Тут, кстати, нет хранимых значений в case, вроде можно не определять Equatable и писать просто
enum SettingsMenuBlock: String { ... }
Stepic/SettingsPresenter.swift
Outdated
func changeVideoQuality(action: VideoQualityChoiceAction) | ||
func changeCodeEditorSettings() | ||
func changeContentLanguageSettings() | ||
func setMenu(menuIDs: [SettingsMenuBlock]) |
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.
Вроде же всегда было Ids
?
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.
Лучше делать IDs сейчас и дальше, так логичнее
Задача: #APPS-1897
Коротко для Release Notes, в формате «Сделали/Добавили/Исправили N»:
Выпилили language widget из explore при первом просмотре
Описание:
Просто добавил нужный UI и нужное поведение. Еще немного порефакторил блоки в
SettingsPresenter
и еще в нескольких местах по мелочи.