Refactor FileDiffActivety (#537)
use androidx @NonNull instead of jetbrains @NotNull Merge branch 'master' into refactor_FileDiffActivity code format corrections Merge branch 'master' into refactor_FileDiffActivity add Unit TESTs for ParseDiff.getFileDiffViewArray add get methods make rm/add similar to gitea stats calc diff stat based on diff itself rename getFileContents -> toString fix empty content bug & add comments format AppUtil.java rm unused working version skip binary files for now ... [DONT CRASH] better regex format FileDiffView.java rename toolbar_title -> toolbarTitle Co-authored-by: 6543 <6543@obermui.de> Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
@@ -86,7 +86,7 @@ public class FilesDiffAdapter extends BaseAdapter {
|
||||
FileDiffView data = (FileDiffView) getItem(position);
|
||||
headerFileName.setText(data.getFileName());
|
||||
|
||||
if(data.isFileType()) {
|
||||
if(data.isFileBinary()) {
|
||||
|
||||
diffStats.setVisibility(View.GONE);
|
||||
diffLines.addView(getMessageView(context.getResources().getString(R.string.binaryFileError)));
|
||||
@@ -97,7 +97,7 @@ public class FilesDiffAdapter extends BaseAdapter {
|
||||
diffStats.setVisibility(View.VISIBLE);
|
||||
headerFileInfo.setText(data.getFileInfo());
|
||||
|
||||
String[] codeLines = getLines(data.getFileContents());
|
||||
String[] codeLines = getLines(data.toString());
|
||||
|
||||
if(MAXIMUM_LINES > codeLines.length) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user