chore: Only hide skip button if post has been selected

This commit is contained in:
Marcus Kida 2022-11-21 11:57:02 +01:00
parent 9ffed8f319
commit 8f28999a93
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
1 changed files with 4 additions and 1 deletions

View File

@ -59,7 +59,6 @@ class ReportStatusViewController: UIViewController, NeedsDependency, ReportViewC
let navigationActionView = NavigationActionView()
navigationActionView.backgroundColor = Asset.Scene.Onboarding.background.color
navigationActionView.backButton.setTitle(L10n.Common.Controls.Actions.skip, for: .normal)
navigationActionView.hidesBackButton = true
return navigationActionView
}()
@ -124,6 +123,10 @@ extension ReportStatusViewController {
.assign(to: \.isEnabled, on: navigationActionView.nextButton)
.store(in: &disposeBag)
if !viewModel.selectStatuses.isEmpty {
navigationActionView.hidesBackButton = true
}
navigationActionView.backButton.addTarget(self, action: #selector(ReportStatusViewController.skipButtonDidPressed(_:)), for: .touchUpInside)
navigationActionView.nextButton.addTarget(self, action: #selector(ReportStatusViewController.nextButtonDidPressed(_:)), for: .touchUpInside)
}