Commit 964099e5 authored by Toni Beier's avatar Toni Beier

Merge branch 'fix_mensa_swipe-to-reload_toast-shown-not-in-ui-thread' into 'develop'

Absturz des aktualieseren des stundesplanes ohne initial importeirtern Kurse

See merge request OpenASiST/openasist4android_core!21
parents d373acde d3a13d8f
...@@ -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