ChangeScreen: Do not show "Cannot Merge" for WIP changes

It is confusing, and has an even more confusing tooltip:
The change cannot be merged due to a path conflict...

Change-Id: I238753fa93166ff95283f283b1c52342229391c1
This commit is contained in:
Orgad Shaneh
2018-06-20 10:07:32 +03:00
parent a09a747e06
commit 42a7e65890

View File

@@ -1232,11 +1232,13 @@ public class ChangeScreen extends Screen {
}
private void renderSubmitType(Change.Status status, boolean canSubmit, SubmitType submitType) {
if (canSubmit && status == Change.Status.NEW && !changeInfo.isWorkInProgress()) {
statusText.setInnerText(
changeInfo.mergeable() ? Util.C.readyToSubmit() : Util.C.mergeConflict());
if (status == Change.Status.NEW && !changeInfo.isWorkInProgress()) {
if (canSubmit) {
statusText.setInnerText(
changeInfo.mergeable() ? Util.C.readyToSubmit() : Util.C.mergeConflict());
}
setVisible(notMergeable, !changeInfo.mergeable());
}
setVisible(notMergeable, !changeInfo.mergeable());
submitActionText.setInnerText(com.google.gerrit.client.admin.Util.toLongString(submitType));
}