Opt-in to ChangeScreen2 as a per-tab preference

If the user visits ChangeScreen2 using #c2/... within this application
session always redirect all #c/... links to ChangeScreen2. This makes
for a smoother flow from search results and the dashboard into the new
UI. Users can get rid of the new UI by simply opening a new tab or a
reload in the current one without #c2/ in the URL.

Change-Id: Ie4890e2d564fa2b896e9dbf52e38f43804d9e470
This commit is contained in:
Shawn Pearce
2013-07-14 19:51:23 -07:00
parent 097b957915
commit c5e1654bb6
4 changed files with 11 additions and 15 deletions

View File

@@ -15,7 +15,6 @@
package com.google.gerrit.client.ui;
import com.google.gerrit.client.Gerrit;
import com.google.gerrit.client.changes.ChangeScreen;
import com.google.gerrit.common.PageLinks;
import com.google.gerrit.common.data.ChangeInfo;
import com.google.gerrit.reviewdb.client.Change;
@@ -57,14 +56,6 @@ public class ChangeLink extends InlineHyperlink {
@Override
public void go() {
Gerrit.display(getTargetHistoryToken(), createScreen());
}
private Screen createScreen() {
if (psid != null) {
return new ChangeScreen(psid);
} else {
return new ChangeScreen(cid);
}
Gerrit.display(getTargetHistoryToken());
}
}