ChangeScreen: Remove no-op change actions copy operation

Before I6a5bf05525 actions map was created to enable delete change
button on draft changes only:

  private void initChangeAction(ChangeInfo info) {
    if (info.status() == Status.DRAFT) {
      NativeMap<ActionInfo> actions = info.hasActions()
          ? info.actions()
          : NativeMap.<ActionInfo> create();
      actions.copyKeysIntoChildren("id");
      if (actions.containsKey("/")) {
        deleteChange.setVisible(true);
        deleteChange.setTitle(actions.get("/").title());
      }
    }
  }

In I6a5bf05525 the logic was extended to non draft changes as well.  In
I0566f6de6a delete change button was moved out from the change screen
class to Actions class. The copying of the actions was left over and
became a no-op.

Change-Id: I7a68116040cd2ae2ccff855d1fa481d5159d0e8d
This commit is contained in:
David Ostrovsky 2017-02-25 19:15:36 +01:00
parent 3a4e1b3a1f
commit 0ba597b678

View File

@ -517,11 +517,6 @@ public class ChangeScreen extends Screen {
}
}
private void initChangeAction(ChangeInfo info) {
NativeMap<ActionInfo> actions = info.hasActions() ? info.actions() : NativeMap.create();
actions.copyKeysIntoChildren("id");
}
private void updatePatchSetsTextStyle(boolean isPatchSetCurrent) {
if (isPatchSetCurrent) {
patchSetsText.removeClassName(style.notCurrentPatchSet());
@ -1316,7 +1311,6 @@ public class ChangeScreen extends Screen {
renderDiffBaseListBox(info);
initReplyButton(info, revision);
initIncludedInAction(info);
initChangeAction(info);
initDownloadAction(info, revision);
initProjectLinks(info);
initBranchLink(info);