diff options
Diffstat (limited to 'gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfoBlock.java')
-rw-r--r-- | gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfoBlock.java | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfoBlock.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfoBlock.java index b942824f73..b4ae2f3d7b 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfoBlock.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfoBlock.java @@ -95,8 +95,9 @@ public class ChangeInfoBlock extends Composite { table.getCellFormatter().addStyleName(row, 0, Gerrit.RESOURCES.css().header()); } - public void display(final Change chg, final AccountInfoCache acc, - SubmitTypeRecord submitTypeRecord) { + public void display(final ChangeDetail changeDetail, + final AccountInfoCache acc, SubmitTypeRecord submitTypeRecord) { + final Change chg = changeDetail.getChange(); final Branch.NameKey dst = chg.getDest(); CopyableLabel changeIdLabel = @@ -114,7 +115,7 @@ public class ChangeInfoBlock extends Composite { table.setWidget(R_BRANCH, 1, new BranchLink(dst.getShortName(), chg .getProject(), chg.getStatus(), dst.get(), null)); - table.setWidget(R_TOPIC, 1, topic(chg)); + table.setWidget(R_TOPIC, 1, topic(changeDetail)); table.setText(R_UPLOADED, 1, mediumFormat(chg.getCreatedOn())); table.setText(R_UPDATED, 1, mediumFormat(chg.getLastUpdatedOn())); table.setText(R_STATUS, 1, Util.toLongString(chg.getStatus())); @@ -146,7 +147,8 @@ public class ChangeInfoBlock extends Composite { } } - public Widget topic(final Change chg) { + public Widget topic(final ChangeDetail changeDetail) { + final Change chg = changeDetail.getChange(); final Branch.NameKey dst = chg.getDest(); FlowPanel fp = new FlowPanel(); @@ -154,9 +156,6 @@ public class ChangeInfoBlock extends Composite { fp.add(new BranchLink(chg.getTopic(), chg.getProject(), chg.getStatus(), dst.get(), chg.getTopic())); - ChangeDetailCache detailCache = ChangeCache.get(chg.getId()).getChangeDetailCache(); - ChangeDetail changeDetail = detailCache.get(); - if (changeDetail.canEditTopicName()) { final Image edit = new Image(Gerrit.RESOURCES.edit()); edit.addStyleName(Gerrit.RESOURCES.css().link()); |