MOBILE-3645 course: Fix loading not dismissed with course format plugin
parent
515c46f399
commit
65e60ed3ac
|
@ -1038,7 +1038,7 @@ export class CoreCourseProvider {
|
||||||
const loading = await CoreDomUtils.showModalLoading();
|
const loading = await CoreDomUtils.showModalLoading();
|
||||||
|
|
||||||
// Wait for site plugins to be fetched.
|
// Wait for site plugins to be fetched.
|
||||||
await CoreSitePlugins.waitFetchPlugins();
|
await CoreUtils.ignoreErrors(CoreSitePlugins.waitFetchPlugins());
|
||||||
|
|
||||||
if (!('format' in course) || typeof course.format == 'undefined') {
|
if (!('format' in course) || typeof course.format == 'undefined') {
|
||||||
const result = await CoreCourseHelper.getCourse(course.id);
|
const result = await CoreCourseHelper.getCourse(course.id);
|
||||||
|
@ -1050,8 +1050,8 @@ export class CoreCourseProvider {
|
||||||
|
|
||||||
if (!format || !CoreSitePlugins.sitePluginPromiseExists(`format_${format}`)) {
|
if (!format || !CoreSitePlugins.sitePluginPromiseExists(`format_${format}`)) {
|
||||||
// No custom format plugin. We don't need to wait for anything.
|
// No custom format plugin. We don't need to wait for anything.
|
||||||
await CoreCourseFormatDelegate.openCourse(<CoreCourseAnyCourseData> course, params);
|
|
||||||
loading.dismiss();
|
loading.dismiss();
|
||||||
|
await CoreCourseFormatDelegate.openCourse(<CoreCourseAnyCourseData> course, params);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1084,6 +1084,8 @@ export class CoreCourseProvider {
|
||||||
|
|
||||||
await CoreDomUtils.showConfirm(message, '', reload, ignore);
|
await CoreDomUtils.showConfirm(message, '', reload, ignore);
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
} finally {
|
||||||
|
loading.dismiss();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue