MOBILE-3915 completion: Fix completion event listener conditions
parent
f07d087947
commit
5e29e65325
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue