class ChangedFilesScreenPresenter {

    public void setup(final ChangeRequest changeRequest,
                      final Consumer<Boolean> finishLoadingCallback,
                      final IntConsumer setChangedFilesCountCallback) {
        changeRequestService.call((final List<ChangeRequestDiff> diffList) -> {
            setChangedFilesCountCallback.accept(diffList.size());

            if (!diffList.isEmpty()) {
                final boolean warnConflict = changeRequest.getStatus() == ChangeRequestStatus.OPEN;
                this.setupDiffList(diffList, warnConflict);
                this.view.showDiffList(true);
            } else {
                this.destroyDiffItems();
                this.view.clearDiffList();
            }

            this.setupFilesSummary(diffList);

            finishLoadingCallback.accept(true);
        }).getDiff(workspaceProject.getSpace().getName(),
                   workspaceProject.getRepository().getAlias(),
                   changeRequest.getId());
    }

    @Inject public  ChangedFilesScreenPresenter(final View view,
                                       final ManagedInstance<DiffItemPresenter> diffItemPresenterInstances,
                                       final ChangeRequestUtils changeRequestUtils,
                                       final Caller<ChangeRequestService> changeRequestService,
                                       final LibraryPlaces libraryPlaces);

}