Move WebInterace Calls to own Interface (#338)
optimize imports Merge branch 'master' into moveWebInteraceCalls-2-ownInterface Merge branch 'master' into moveWebInteraceCalls-2-ownInterface move WebInterface calls to own interface rename WEB api for getting PullDiff Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/338 Reviewed-by: M M Arif <mmarif@swatian.com>
This commit is contained in:
		@@ -72,18 +72,18 @@ public class FileDiffActivity extends BaseActivity {
 | 
			
		||||
 | 
			
		||||
        mProgressBar.setVisibility(View.VISIBLE);
 | 
			
		||||
 | 
			
		||||
        String fileDiffName = tinyDb.getString("issueNumber")+".diff";
 | 
			
		||||
        String pullIndex = tinyDb.getString("issueNumber");
 | 
			
		||||
 | 
			
		||||
        getFileContents(tinyDb.getString("instanceUrlWithProtocol"), repoOwner, repoName, fileDiffName);
 | 
			
		||||
        getPullDiffContent(tinyDb.getString("instanceUrlWithProtocol"), repoOwner, repoName, pullIndex);
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void getFileContents(String instanceUrl, String owner, String repo, String filename) {
 | 
			
		||||
    private void getPullDiffContent(String instanceUrl, String owner, String repo, String filename) {
 | 
			
		||||
 | 
			
		||||
        Call<ResponseBody> call = RetrofitClient
 | 
			
		||||
                .getInstance(instanceUrl, getApplicationContext())
 | 
			
		||||
                .getApiInterface()
 | 
			
		||||
                .getFileDiffContents(owner, repo, filename);
 | 
			
		||||
                .getWebInterface()
 | 
			
		||||
                .getPullDiffContent(owner, repo, filename);
 | 
			
		||||
 | 
			
		||||
        call.enqueue(new Callback<ResponseBody>() {
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user