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