Commit b21b6367 authored by Toni Beier's avatar Toni Beier

Refactoring: Rename onManagedError in CourseParseCallback class to onCoursesParsed

parent b97faefc
......@@ -12,5 +12,5 @@ public interface CourseParseCallback {
public void onSuccess();
public void onManagedError(CourseList parsed);
public void onCoursesParsed(CourseList parsedCourses);
}
......@@ -42,9 +42,9 @@ class TimetableCallback implements ParserCallback<CourseList> {
}
@Override
public void onManagedError(CourseList parsed) {
public void onManagedError(CourseList parsedCourses) {
if (pc != null) {
pc.onManagedError(parsed);
pc.onCoursesParsed(parsedCourses);
} else if (pg != null) {
pg.dismiss();
}
......
......@@ -118,7 +118,7 @@ public class TimetableFragment extends AbstractASiSTFragment {
}
@Override
public void onManagedError(final CourseList parsedCourses) {
public void onCoursesParsed(final CourseList parsedCourses) {
// Called also after parsing was successfully done, but in background thread.
// FIX: rename method and add documentation
/*
......
......@@ -67,15 +67,15 @@ public class UICallback implements CourseParseCallback {
}
@Override
public void onManagedError(CourseList result){
if(result.getCode() == null){
public void onCoursesParsed(CourseList parsedCourses){
if(parsedCourses.getCode() == null){
return;
}
FragmentManager fm = context.getSupportFragmentManager();
String errorReason = result.getMessage();
String code = "Code:" + result.getCode();
String uri = "Uri:" + result.getUri();
String status = "Status:" + result.getStatus();
String errorReason = parsedCourses.getMessage();
String code = "Code:" + parsedCourses.getCode();
String uri = "Uri:" + parsedCourses.getUri();
String status = "Status:" + parsedCourses.getStatus();
ASiSTDialog dialog;
if(BuildConfig.DEBUG) {
dialog = new ASiSTDialog(translate(R.string.timetable_import_error_message), errorReason + "\n\n" + code + "\n\n" + uri + "\n\n" + status, true, false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment