From 663f42de2ab9db68a74bb0964262d0a064f4838a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 8 Sep 2023 14:55:15 +0200 Subject: [PATCH] MOBILE-4201 login: Remove deprecated login functions --- .../features/login/services/login-helper.ts | 64 ------------------- 1 file changed, 64 deletions(-) diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index 4df017085..ee194491b 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -52,11 +52,6 @@ export const GET_STARTED_URL = 'https://moodle.com'; @Injectable({ providedIn: 'root' }) export class CoreLoginHelperProvider { - /** - * @deprecated since 3.9.5. - */ - static readonly OPEN_COURSE = 'open_course'; - static readonly ONBOARDING_DONE = 'onboarding_done'; static readonly FAQ_URL_IMAGE_HTML = ''; static readonly FAQ_QRCODE_IMAGE_HTML = ''; @@ -467,41 +462,6 @@ export class CoreLoginHelperProvider { return ['/login/site', { showKeyboard }]; } - /** - * Open a page that doesn't belong to any site. - * - * @param page Page to open. - * @param params Params of the page. - * @returns Promise resolved when done. - * @deprecated since 3.9.5. Use CoreNavigator.navigateToLoginCredentials instead. - */ - async goToNoSitePage(page: string, params?: Params): Promise { - await CoreNavigator.navigateToLoginCredentials(params); - } - - /** - * Go to the initial page of a site depending on 'userhomepage' setting. - * - * @param navCtrlUnused Deprecated param. - * @param page Name of the page to load after loading the main page. - * @param params Params to pass to the page. - * @param options Navigation options. - * @param url URL to open once the main menu is loaded. - * @returns Promise resolved when done. - * @deprecated since 3.9.5. Use CoreNavigator.navigateToSiteHome or CoreNavigator.navigateToSitePath instead. - */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - async goToSiteInitialPage(navCtrlUnused?: unknown, page?: string, params?: any, options?: any, url?: string): Promise { - await CoreNavigator.navigateToSiteHome({ - ...options, - params: { - redirectPath: page, - redirectOptions: { params }, - urlToOpen: url, - }, - }); - } - /** * Convenient helper to handle authentication in the app using a token received by SSO login. If it's a new account, * the site is stored and the user is authenticated. If the account already exists, update its token. @@ -655,17 +615,6 @@ export class CoreLoginHelperProvider { return code == CoreConstants.LOGIN_SSO_CODE || code == CoreConstants.LOGIN_SSO_INAPP_CODE; } - /** - * Load a certain page in the main menu page. - * - * @param page Name of the page to load. - * @param params Params to pass to the page. - * @deprecated since 3.9.5. Use CoreNavigator.navigateToSitepath instead. - */ - loadPageInMainMenu(page: string, params?: Params): void { - CoreNavigator.navigateToSitePath(page, { params }); - } - /** * Open a browser to perform OAuth login (Google, Facebook, Microsoft). * @@ -869,19 +818,6 @@ export class CoreLoginHelperProvider { return loginUrl; } - /** - * Redirect to a new page, setting it as the root page and loading the right site if needed. - * - * @param page Name of the page to load. - * @param params Params to pass to the page. - * @param siteId Site to load. If not defined, current site. - * @returns Promise resolved when done. - * @deprecated since 3.9.5. Use CoreNavigator.navigateToSitePath instead. - */ - async redirect(page: string, params?: Params, siteId?: string): Promise { - await CoreNavigator.navigateToSitePath(page, { params, siteId }); - } - /** * Request a password reset. *