MOBILE-3320 wiki: Fix animation when going back to home page
parent
11f47a7f7c
commit
ad56eeb203
|
@ -590,7 +590,7 @@ export class AddonModWikiIndexComponent extends CoreCourseModuleMainActivityComp
|
|||
if (modalData) {
|
||||
if (modalData.home) {
|
||||
// Go back to the initial page of the wiki.
|
||||
CoreNavigator.navigateToSitePath(modalData.home);
|
||||
CoreNavigator.navigateToSitePath(modalData.home, { animationDirection: 'back' });
|
||||
} else if (modalData.page) {
|
||||
this.goToPage(modalData.page);
|
||||
}
|
||||
|
|
|
@ -44,8 +44,7 @@ export type CoreRedirectPayload = {
|
|||
/**
|
||||
* Navigation options.
|
||||
*/
|
||||
export type CoreNavigationOptions = {
|
||||
animated?: boolean;
|
||||
export type CoreNavigationOptions = Pick<NavigationOptions, 'animated'|'animation'|'animationDirection'> & {
|
||||
params?: Params;
|
||||
reset?: boolean;
|
||||
preferCurrentTab?: boolean; // Default true.
|
||||
|
@ -132,6 +131,8 @@ export class CoreNavigatorService {
|
|||
const url: string[] = [/^[./]/.test(path) ? path : `./${path}`];
|
||||
const navigationOptions: NavigationOptions = CoreObject.withoutEmpty({
|
||||
animated: options.animated,
|
||||
animation: options.animation,
|
||||
animationDirection: options.animationDirection,
|
||||
queryParams: CoreObject.isEmpty(options.params ?? {}) ? null : CoreObject.withoutEmpty(options.params),
|
||||
relativeTo: path.startsWith('/') ? null : this.getCurrentRoute(),
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue