Commit d3a13d8f authored by Toni Beier's avatar Toni Beier

Fix: The toast which should notify the user initial import the timetable run...

Fix: The toast which should notify the user initial import the timetable run now in the user interface thread
parent d373acde
...@@ -131,15 +131,19 @@ public class TimetableFragment extends AbstractASiSTFragment { ...@@ -131,15 +131,19 @@ public class TimetableFragment extends AbstractASiSTFragment {
} }
}, null); }, null);
} else { } else {
TextView toastContent = new TextView(getContext()); getActivity().runOnUiThread(new Runnable() {
toastContent.setText(R.string.module_timetable_course_code_not_found); @Override
toastContent.setGravity(Gravity.CENTER); public void run() {
TextView toastContent = new TextView(getContext());
Toast courseCodeNotFoundToast = new Toast(getContext()); toastContent.setText(R.string.module_timetable_course_code_not_found);
courseCodeNotFoundToast.setView(toastContent); toastContent.setGravity(Gravity.CENTER);
courseCodeNotFoundToast.setDuration(Toast.LENGTH_LONG);
courseCodeNotFoundToast.show(); Toast courseCodeNotFoundToast = new Toast(getContext());
courseCodeNotFoundToast.setView(toastContent);
courseCodeNotFoundToast.setDuration(Toast.LENGTH_LONG);
courseCodeNotFoundToast.show();
}
});
refreshTimeTableSwipeLayout.setRefreshing(false); refreshTimeTableSwipeLayout.setRefreshing(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