From 5e29e65325d1ff72450564a9adbf58bf24331229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 31 Jan 2022 14:11:51 +0100 Subject: [PATCH] MOBILE-3915 completion: Fix completion event listener conditions --- .../module-completion-legacy/module-completion-legacy.ts | 2 +- .../module-manual-completion/module-manual-completion.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/features/course/components/module-completion-legacy/module-completion-legacy.ts b/src/core/features/course/components/module-completion-legacy/module-completion-legacy.ts index 023967422..3f10eefa4 100644 --- a/src/core/features/course/components/module-completion-legacy/module-completion-legacy.ts +++ b/src/core/features/course/components/module-completion-legacy/module-completion-legacy.ts @@ -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; } diff --git a/src/core/features/course/components/module-manual-completion/module-manual-completion.ts b/src/core/features/course/components/module-manual-completion/module-manual-completion.ts index 926349adf..6a21680b7 100644 --- a/src/core/features/course/components/module-manual-completion/module-manual-completion.ts +++ b/src/core/features/course/components/module-manual-completion/module-manual-completion.ts @@ -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; }