From 25d59ce754168f890598b5e818b4131b74ac580c Mon Sep 17 00:00:00 2001 From: Hongkai Liu Date: Thu, 19 Jan 2017 11:10:51 -0500 Subject: [PATCH] Fix token in Group screen The wrong token leads to a wrong browser history. E.g., pressing "back-history" button on browser will loop on the group page after navigating to group page and clicking "General" and "Members" tabs. Bug: Issue 5298 Change-Id: I3c2f59e5ee35e343563a5174fa0d5456e33bdb88 --- .../java/com/google/gerrit/client/Dispatcher.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java index b7405c7e9d..ba4b202101 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Dispatcher.java @@ -717,11 +717,15 @@ public class Dispatcher { // shown in the web UI). // if (AccountGroup.isInternalGroup(group.getGroupUUID())) { - Gerrit.display(toGroup(group.getGroupId(), AccountGroupScreen.MEMBERS), - new AccountGroupMembersScreen(group, token)); + String newToken = + toGroup(group.getGroupId(), AccountGroupScreen.MEMBERS); + Gerrit.display(newToken, + new AccountGroupMembersScreen(group, newToken)); } else { - Gerrit.display(toGroup(group.getGroupId(), AccountGroupScreen.INFO), - new AccountGroupInfoScreen(group, token)); + String newToken = + toGroup(group.getGroupId(), AccountGroupScreen.INFO); + Gerrit.display(newToken, + new AccountGroupInfoScreen(group, newToken)); } } else if (AccountGroupScreen.INFO.equals(panel)) { Gerrit.display(token, new AccountGroupInfoScreen(group, token));