ChangeScreen2: Respect user preference for unified diff view

Change-Id: I6ca7c3957bc111bb1a6bc8a73c607fbe75db6ea5
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
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 1b89a5a..666c3e2 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
@@ -652,6 +652,12 @@
 
           if ("".equals(panel)) {
             if (isChangeScreen2()) {
+              if (Gerrit.isSignedIn()
+                  && DiffView.UNIFIED_DIFF.equals(Gerrit.getUserAccount()
+                      .getGeneralPreferences().getDiffView())) {
+                return new PatchScreen.Unified(id, patchIndex, patchSetDetail,
+                    patchTable, top, baseId);
+              }
               return new SideBySide2(baseId, id.getParentKey(), id.get(),
                   side, line);
             }
@@ -672,8 +678,7 @@
                 top, //
                 baseId //
             );
-          } else if (("cm".equals(panel) && Gerrit.getConfig().getNewFeatures())
-              || ("".equals(panel) && isChangeScreen2())) {
+          } else if ("cm".equals(panel) && Gerrit.getConfig().getNewFeatures()) {
             if (Gerrit.isSignedIn()
                 && DiffView.UNIFIED_DIFF.equals(Gerrit.getUserAccount()
                     .getGeneralPreferences().getDiffView())) {