Commits

Juha Kuitunen committed c77a742

display error message when diff can not be retrieved

  • Participants
  • Parent commits 1d50f3a

Comments (0)

Files changed (1)

src/com/saibotd/bitbeaker/DiffActivity.java

 
 		progressDialog = ProgressDialog.show(this, "", "Loading diff...", true);
 		AsyncLoader asyncLoader = new AsyncLoader();
-		asyncLoader.execute("https://bitbucket.org/"+ owner +"/"+slug+"/changeset/"+changeset_id+"/raw/");
+		asyncLoader.execute("https://bitbucket.org/"+ owner +"/"+slug+"/changeset/"+changeset_id+"/raw/");//TODO: authenticate to get diff for own private repositories 
 		((TextView) findViewById(R.id.header_title)).setText("Diff: "+changeset_id);
 	}
 
 	public void AsyncLoaderDone(String result) {
 		super.AsyncLoaderDone(result);
 		result = splitDiff(result);
+		if (result.equals("")) result = "Diff not found for requested file.\nPrivate repositories not supported.";
 		code = TextUtils.htmlEncode(result.replace("\t", "  "));
 		WebView webView = (WebView) findViewById(R.id.diff_webview);
 		webView.getSettings().setBuiltInZoomControls(true);