-
Notifications
You must be signed in to change notification settings - Fork 10
Feature/main/tratar classe #24
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
base: main
Are you sure you want to change the base?
Conversation
… and add some marks
| import Foundation | ||
| import UIKit | ||
|
|
||
| class RioAlertHelper { |
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.
futuramente vou sugerir para usar composição para essa funcao (aula de LI)
mas por enquanto sugiro apenas usar enum ao inves de classe
já que nao tem necessidade de instanciar esse objeto
| import Foundation | ||
| import UIKit | ||
|
|
||
| class RioResetPasswordViewConfigurator { |
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.
nao interessante performar operações da viewController fora dela (com exceção do coordinator)
todas as funcoes desse objeto recebem viewController de parâmetro para performar acoes nela
eu sugiro duas opções:
- deixar tudo na viewController mesmo
- tirar View da ViewController e fazer ajustes de layout na View (igual mostrado ontem na aula)
| recoverPasswordButton.setTitleColor(.white, for: .normal) | ||
| recoverPasswordButton.isEnabled = isValid | ||
| private func updateRecoverPasswordButtonTitleForSuccess() { | ||
| recoverPasswordButton.setTitle("Voltar", for: .normal) |
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.
n tem necessidade de uma funcao com 1 linha
| try validateEmail(email) | ||
| try validateInternetConnection() | ||
|
|
||
| service.resetPassword(email: email) { [weak self] success 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.
usar async throws na funcao resetPassword da sua service
vai fazer com que essa funcao aqui fique muito mais limpa
ppedroam
left a comment
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.
code review 1
lesson 2