MOBILE-3099 module: Fix module navigation animation
parent
6e976570f7
commit
ed9e5f9869
|
@ -299,18 +299,20 @@ export class CoreCourseModuleNavigationComponent implements OnInit, OnDestroy {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const options: CoreNavigationOptions = {
|
||||||
|
replace: true,
|
||||||
|
animationDirection: next ? 'forward' : 'back',
|
||||||
|
};
|
||||||
|
|
||||||
if (module.uservisible === false) {
|
if (module.uservisible === false) {
|
||||||
const section = next ? this.nextModuleSection : this.previousModuleSection;
|
const section = next ? this.nextModuleSection : this.previousModuleSection;
|
||||||
const options: CoreNavigationOptions = {
|
options.params = {
|
||||||
replace: true,
|
module,
|
||||||
params: {
|
section,
|
||||||
module,
|
|
||||||
section,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
CoreNavigator.navigateToSitePath('course/' + this.courseId + '/' + module.id +'/module-preview', options);
|
CoreNavigator.navigateToSitePath('course/' + this.courseId + '/' + module.id +'/module-preview', options);
|
||||||
} else {
|
} else {
|
||||||
CoreCourseModuleDelegate.openActivityPage(module.modname, module, this.courseId, { replace: true });
|
CoreCourseModuleDelegate.openActivityPage(module.modname, module, this.courseId, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue