fix: sign up error alert missing issue

This commit is contained in:
CMK 2022-04-26 16:48:06 +08:00
parent 2ddd4354ef
commit 2288efc113
1 changed files with 16 additions and 16 deletions

View File

@ -208,22 +208,22 @@ extension MastodonRegisterViewController {
// self.reasonErrorPromptLabel.attributedText = prompt // self.reasonErrorPromptLabel.attributedText = prompt
// } // }
// .store(in: &disposeBag) // .store(in: &disposeBag)
// viewModel.error
// .receive(on: DispatchQueue.main) viewModel.$error
// .sink { [weak self] error in .receive(on: DispatchQueue.main)
// guard let self = self else { return } .sink { [weak self] error in
// guard let error = error as? Mastodon.API.Error else { return } guard let self = self else { return }
// let alertController = UIAlertController(for: error, title: "Sign Up Failure", preferredStyle: .alert) guard let error = error as? Mastodon.API.Error else { return }
// let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .default, handler: nil) let alertController = UIAlertController(for: error, title: "Sign Up Failure", preferredStyle: .alert)
// alertController.addAction(okAction) let okAction = UIAlertAction(title: L10n.Common.Controls.Actions.ok, style: .default, handler: nil)
// self.coordinator.present( alertController.addAction(okAction)
// scene: .alertController(alertController: alertController), self.coordinator.present(
// from: nil, scene: .alertController(alertController: alertController),
// transition: .alertController(animated: true, completion: nil) from: nil,
// ) transition: .alertController(animated: true, completion: nil)
// } )
// .store(in: &disposeBag) }
// .store(in: &disposeBag)
viewModel.avatarMediaMenuActionPublisher viewModel.avatarMediaMenuActionPublisher
.receive(on: DispatchQueue.main) .receive(on: DispatchQueue.main)