Show "File n of N" in diff views
This allows the reviewer to see how many files are still left to review and how many are already done. Change-Id: Id89eb7c85a557708d5de7bf1447747661eb1e3a1 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -74,6 +74,8 @@ public class Header extends Composite {
|
||||
@UiField CheckBox reviewed;
|
||||
@UiField Element project;
|
||||
@UiField Element filePath;
|
||||
@UiField Element fileNumber;
|
||||
@UiField Element fileCount;
|
||||
|
||||
@UiField Element noDiff;
|
||||
@UiField FlowPanel linkPanel;
|
||||
@@ -143,6 +145,9 @@ public class Header extends Composite {
|
||||
public void onSuccess(NativeMap<FileInfo> result) {
|
||||
JsArray<FileInfo> files = result.values();
|
||||
FileInfo.sortFileInfoByPath(files);
|
||||
fileNumber.setInnerText(
|
||||
Integer.toString(Natives.asList(files).indexOf(result.get(path)) + 1));
|
||||
fileCount.setInnerText(Integer.toString(files.length()));
|
||||
int index = 0; // TODO: Maybe use patchIndex.
|
||||
for (int i = 0; i < files.length(); i++) {
|
||||
if (path.equals(files.get(i).path())) {
|
||||
|
||||
Reference in New Issue
Block a user