MOBILE-3915 completion: Fix completion event listener conditions

main
Pau Ferrer Ocaña 2022-01-31 14:11:51 +01:00
parent f07d087947
commit 5e29e65325
2 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ export class CoreCourseModuleCompletionLegacyComponent extends CoreCourseModuleC
*/
ngOnInit(): void {
this.completionObserver = CoreEvents.on(CoreEvents.COMPLETION_CHANGED, (data) => {
if (!this.completion || this.completion.cmid != data.completion.cmid && data.type != CoreCourseCompletionType.MANUAL) {
if (!this.completion || this.completion.cmid != data.completion.cmid || data.type != CoreCourseCompletionType.MANUAL) {
return;
}

View File

@ -42,7 +42,7 @@ export class CoreCourseModuleManualCompletionComponent implements OnInit, OnChan
*/
ngOnInit(): void {
this.completionObserver = CoreEvents.on(CoreEvents.COMPLETION_CHANGED, (data) => {
if (!this.completion || this.completion.cmid != data.completion.cmid && data.type != CoreCourseCompletionType.MANUAL) {
if (!this.completion || this.completion.cmid != data.completion.cmid || data.type != CoreCourseCompletionType.MANUAL) {
return;
}