Enhance UpToChange link to activate the last browsed patchset.
While returning to the Change using "UpToChange" link in any patchset, always the latest patchset is activated. This commit modifies the functionality of the "UpToChange" link by storing the last browsed patchset and activating it on return. This makes it easy to review older patchsets. Bug: issue 822 Change-Id: Iaf01c53797d92434a0bc150f73ad232aec3619d6
This commit is contained in:
committed by
Shawn O. Pearce
parent
620255aef7
commit
547e8e8ebf
@@ -250,9 +250,8 @@ public abstract class PatchScreen extends Screen implements
|
||||
protected void onInitUI() {
|
||||
super.onInitUI();
|
||||
|
||||
final Change.Id ck = patchKey.getParentKey().getParentKey();
|
||||
keysNavigation = new KeyCommandSet(Gerrit.C.sectionNavigation());
|
||||
keysNavigation.add(new UpToChangeCommand(ck, 0, 'u'));
|
||||
keysNavigation.add(new UpToChangeCommand(patchKey.getParentKey(), 0, 'u'));
|
||||
keysNavigation.add(new FileListCmd(0, 'f', PatchUtil.C.fileList()));
|
||||
|
||||
historyTable = new HistoryTable(this);
|
||||
@@ -284,9 +283,8 @@ public abstract class PatchScreen extends Screen implements
|
||||
contentTable = createContentTable();
|
||||
contentTable.fileList = fileList;
|
||||
|
||||
topNav =
|
||||
new NavLinks(keysNavigation, patchKey.getParentKey().getParentKey());
|
||||
bottomNav = new NavLinks(null, patchKey.getParentKey().getParentKey());
|
||||
topNav = new NavLinks(keysNavigation, patchKey.getParentKey());
|
||||
bottomNav = new NavLinks(null, patchKey.getParentKey());
|
||||
|
||||
add(topNav);
|
||||
contentPanel = new FlowPanel();
|
||||
|
||||
Reference in New Issue
Block a user