Pull Diff View: Use new API if gitea >= 1.13.0 (#536)

right arg order & right instanceUrl

use new API if gitea >= 1.13.0

correct name

format code

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-by: opyale <opyale@noreply.codeberg.org>
This commit is contained in:
6543
2020-06-09 15:36:08 +02:00
parent 42640f2d1c
commit 50e0142f6c
3 changed files with 151 additions and 130 deletions

View File

@@ -64,7 +64,10 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
mergePullRequest.setVisibility(View.VISIBLE);
}
if(tinyDB.getString("repoType").equals("public")) {
if(new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.13.0")) {
openFilesDiff.setVisibility(View.VISIBLE);
}
else if(tinyDB.getString("repoType").equals("public")) {
openFilesDiff.setVisibility(View.VISIBLE);
}
else {