MOBILE-4653 chore: Remove 4.2 deprecated functions

main
Pau Ferrer Ocaña 2024-11-06 10:33:34 +01:00
parent 8846de838d
commit 602c673e7c
3 changed files with 0 additions and 60 deletions

View File

@ -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.
*

View File

@ -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<boolean> {
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).
*

View File

@ -287,19 +287,6 @@ export class CoreXAPIProvider {
return site.write<string[]>('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<string> {
return CoreXAPIIRI.generate(contextId, type, siteId);
}
/**
* Invalidates a state.
*