SideBySide2: patch set selection isn't kept when navigating to next file

Bug: Issue 2148
Change-Id: I6c9be113f0551a3e83ddb37fb02014d002c8d09f
This commit is contained in:
David Ostrovsky
2013-10-02 08:28:48 +02:00
parent 2e8d99da7a
commit 1967003e31
2 changed files with 8 additions and 2 deletions

View File

@@ -60,15 +60,18 @@ class Header extends Composite {
@UiField InlineHyperlink next;
private final KeyCommandSet keys;
private final PatchSet.Id base;
private final PatchSet.Id patchSetId;
private final String path;
private boolean hasPrev;
private boolean hasNext;
private String nextPath;
Header(KeyCommandSet keys, PatchSet.Id patchSetId, String path) {
Header(KeyCommandSet keys, PatchSet.Id base, PatchSet.Id patchSetId,
String path) {
initWidget(uiBinder.createAndBindUi(this));
this.keys = keys;
this.base = base;
this.patchSetId = patchSetId;
this.path = path;
@@ -164,6 +167,9 @@ class Header extends Composite {
Change.Id c = patchSetId.getParentKey();
StringBuilder p = new StringBuilder();
p.append("/c/").append(c).append('/');
if (base != null) {
p.append(base.get()).append("..");
}
p.append(patchSetId.get()).append('/').append(KeyUtil.encode(info.path()));
p.append(info.binary() ? ",unified" : ",cm");
return p.toString();