Merge pull request #662 from mastodon/report_post_next
Always allow to continue when reporting a post if at least one is selected
This commit is contained in:
commit
d98306b505
|
@ -123,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)
|
||||
}
|
||||
|
|
|
@ -71,9 +71,7 @@ class ReportStatusViewModel {
|
|||
}
|
||||
|
||||
$selectStatuses
|
||||
.map { statuses -> Bool in
|
||||
return status == nil ? !statuses.isEmpty : statuses.count > 1
|
||||
}
|
||||
.map { !$0.isEmpty }
|
||||
.assign(to: &$isNextButtonEnabled)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue