DiffTable: Don't show "No Differences" for binary files.

Also include full diff header when a diff is binary.

Change-Id: I57c3ea48079bbf954de27558bd18c528d4f9e434
This commit is contained in:
Michael Zhou
2016-03-16 16:25:40 -04:00
parent 2545752989
commit bf7ee7087a
2 changed files with 11 additions and 6 deletions

View File

@@ -353,9 +353,13 @@ public class Header extends Composite {
}
void setNoDiff(DiffInfo diff) {
JsArray<Region> regions = diff.content();
boolean b = regions.length() == 0
|| (regions.length() == 1 && regions.get(0).ab() != null);
UIObject.setVisible(noDiff, b);
if (diff.binary()) {
UIObject.setVisible(noDiff, false); // Don't bother showing "No Differences"
} else {
JsArray<Region> regions = diff.content();
boolean b = regions.length() == 0
|| (regions.length() == 1 && regions.get(0).ab() != null);
UIObject.setVisible(noDiff, b);
}
}
}