We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Swift code:
guard let match = self.interactor.match, (interactor.userIsOwner || interactor.userIsPlayer) else { self.view?.updateResultStatus(MatchResultStatusItem.viewOnly(title: R.string.localizable.match_edit_result_view_only_title())) return }
Transformed code:
val match = this.interactor.match if (match == null || !(interactor.userIsOwner && !interactor.userIsPlayer)) { this.view?.updateResultStatus(MatchResultStatusItem.viewOnly(title = R.string.localizable.match_edit_result_view_only_title())) return }
Correct transformation:
val match = this.interactor.match if (match == null || (!interactor.userIsOwner && !interactor.userIsPlayer)) { this.view?.updateResultStatus(MatchResultStatusItem.viewOnly(title = Context.getString(R.string.match_edit_result_view_only_title))) return }
The text was updated successfully, but these errors were encountered:
#82 Fixed guard condition
3443d8d
Simplified to
val match = this.interactor.match if (match == null || !(interactor.userIsOwner || interactor.userIsPlayer)) { this.view?.updateResultStatus(MatchResultStatusItem.viewOnly(title = R.string.localizable.match_edit_result_view_only_title())) return }
And fixed with #106
Sorry, something went wrong.
Merge pull request #106 from angelolloqui/fix/guard
54093fc
No branches or pull requests
Swift code:
Transformed code:
Correct transformation:
The text was updated successfully, but these errors were encountered: