From 602c673e7cdc13681616e5fc4da1175f0e328a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Nov 2024 10:33:34 +0100 Subject: [PATCH] MOBILE-4653 chore: Remove 4.2 deprecated functions --- .../services/notifications-helper.ts | 13 ------- .../features/login/services/login-helper.ts | 34 ------------------- src/core/features/xapi/services/xapi.ts | 13 ------- 3 files changed, 60 deletions(-) diff --git a/src/addons/notifications/services/notifications-helper.ts b/src/addons/notifications/services/notifications-helper.ts index e03c2b10c..bcf4305f7 100644 --- a/src/addons/notifications/services/notifications-helper.ts +++ b/src/addons/notifications/services/notifications-helper.ts @@ -37,19 +37,6 @@ import { CoreTimeUtils } from '@services/utils/time'; @Injectable({ providedIn: 'root' }) export class AddonNotificationsHelperProvider { - /** - * Formats the text of a notification. - * - * @param notification The notification object. - * @returns The notification formatted to render. - * @deprecated since 4.2. This function isn't needed anymore. - */ - formatNotificationText( - notification: AddonNotificationsNotificationMessageFormatted, - ): AddonNotificationsNotificationMessageFormatted { - return notification; - } - /** * Format preferences data. * diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index 849c357f3..372442e57 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -304,18 +304,6 @@ export class CoreLoginHelperProvider { return CorePolicy.getSitePoliciesURL(siteId); } - /** - * Get fixed site or sites. - * - * @returns Fixed site or list of fixed sites. - * @deprecated since 4.2. Use CoreConstants.CONFIG.sites or getAvailableSites() instead. - */ - getFixedSites(): string | CoreLoginSiteInfo[] { - const notStagingSites = CoreConstants.CONFIG.sites.filter(site => !site.staging); - - return notStagingSites.length === 1 ? notStagingSites[0].url : notStagingSites; - } - /** * Get Available sites (includes staging sites if are enabled). It doesn't include demo mode site. * @@ -480,18 +468,6 @@ export class CoreLoginHelperProvider { return CoreSites.newSite(siteUrl, token, privateToken, true, oauthId); } - /** - * Check if the app is configured to use several fixed URLs. - * - * @returns Whether there are several fixed URLs. - * @deprecated since 4.2. Use CoreConstants.CONFIG.sites.length > 1 instead. - */ - async hasSeveralFixedSites(): Promise { - const sites = await this.getAvailableSites(); - - return sites.length > 1; - } - /** * Given a site public config, check if email signup is disabled. * @@ -521,16 +497,6 @@ export class CoreLoginHelperProvider { return !!disabledFeatures.match(regEx); } - /** - * Check if the app is configured to use a fixed URL (only 1). - * - * @returns Whether there is 1 fixed URL. - * @deprecated since 4.2. Use isSingleFixedSite instead. - */ - isFixedUrlSet(): boolean { - return CoreConstants.CONFIG.sites.filter(site => !site.staging).length === 1; - } - /** * Check if the app is configured to use a fixed URL (only 1). * diff --git a/src/core/features/xapi/services/xapi.ts b/src/core/features/xapi/services/xapi.ts index a48ab6b7e..8df9b0615 100644 --- a/src/core/features/xapi/services/xapi.ts +++ b/src/core/features/xapi/services/xapi.ts @@ -287,19 +287,6 @@ export class CoreXAPIProvider { return site.write('core_xapi_get_states', data); } - /** - * Get URL for XAPI events. - * - * @param contextId Context ID. - * @param type Type (e.g. 'activity'). - * @param siteId Site ID. If not defined, current site. - * @returns Promise resolved when done. - * @deprecated since 4.2. Use CoreXAPIIRI.generate instead. - */ - async getUrl(contextId: number, type: string, siteId?: string): Promise { - return CoreXAPIIRI.generate(contextId, type, siteId); - } - /** * Invalidates a state. *