Fix inconsistent behavior of diff view when viewing binary files

In the new change screen, if the user clicks on a binary file in
the file list, the unified view is used.  Then when navigating to
a previous or next file that is not binary, the diff view stays in
the old unified setting.  It is only possible to get back to the
new side-by-side view by going back to the change screen and then
opening the non-binary file from there.

To keep consistent behavior of diff view, always use unified diff
for binary files.  Use the user's preference setting for non-binary
files.

Change-Id: Ie4ece4cb740df8a69cbf3d2d42e4b0fb05461520
This commit is contained in:
Bruce Zu
2014-03-26 16:03:41 +08:00
committed by David Pursehouse
parent bb9c63a3a9
commit 72bced0061
2 changed files with 22 additions and 6 deletions

View File

@@ -529,7 +529,7 @@ public class Dispatcher {
}
}
private static boolean isChangeScreen2() {
public static boolean isChangeScreen2() {
if (changeScreen2) {
return true;
}
@@ -593,6 +593,9 @@ public class Dispatcher {
}
if ("".equals(panel)) {
if (isChangeScreen2()) {
return new SideBySide2(baseId, id.getParentKey(), id.get());
}
return new PatchScreen.SideBySide( //
id, //
patchIndex, //