Merge pull request #1689 from crazyserver/MOBILE-2688-2
MOBILE-2688 course: Show message error when starring in offlinemain
commit
abddc4766d
|
@ -219,6 +219,10 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy {
|
||||||
this.course.hidden = hide;
|
this.course.hidden = hide;
|
||||||
this.eventsProvider.trigger(
|
this.eventsProvider.trigger(
|
||||||
CoreCoursesProvider.EVENT_MY_COURSES_UPDATED, {course: this.course}, this.sitesProvider.getCurrentSiteId());
|
CoreCoursesProvider.EVENT_MY_COURSES_UPDATED, {course: this.course}, this.sitesProvider.getCurrentSiteId());
|
||||||
|
}).catch((error) => {
|
||||||
|
if (!this.isDestroyed) {
|
||||||
|
this.domUtils.showErrorModalDefault(error, 'Error changing course visibility.');
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.showSpinner = false;
|
this.showSpinner = false;
|
||||||
});
|
});
|
||||||
|
@ -236,6 +240,10 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy {
|
||||||
this.course.isfavourite = favourite;
|
this.course.isfavourite = favourite;
|
||||||
this.eventsProvider.trigger(
|
this.eventsProvider.trigger(
|
||||||
CoreCoursesProvider.EVENT_MY_COURSES_UPDATED, {course: this.course}, this.sitesProvider.getCurrentSiteId());
|
CoreCoursesProvider.EVENT_MY_COURSES_UPDATED, {course: this.course}, this.sitesProvider.getCurrentSiteId());
|
||||||
|
}).catch((error) => {
|
||||||
|
if (!this.isDestroyed) {
|
||||||
|
this.domUtils.showErrorModalDefault(error, 'Error changing course favourite attribute.');
|
||||||
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.showSpinner = false;
|
this.showSpinner = false;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue