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 {
}
}, null);
} else {
TextView toastContent = new TextView(getContext());
toastContent.setText(R.string.module_timetable_course_code_not_found);
toastContent.setGravity(Gravity.CENTER);
Toast courseCodeNotFoundToast = new Toast(getContext());
courseCodeNotFoundToast.setView(toastContent);
courseCodeNotFoundToast.setDuration(Toast.LENGTH_LONG);
courseCodeNotFoundToast.show();
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
TextView toastContent = new TextView(getContext());
toastContent.setText(R.string.module_timetable_course_code_not_found);
toastContent.setGravity(Gravity.CENTER);
Toast courseCodeNotFoundToast = new Toast(getContext());
courseCodeNotFoundToast.setView(toastContent);
courseCodeNotFoundToast.setDuration(Toast.LENGTH_LONG);
courseCodeNotFoundToast.show();
}
});
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