MOBILE-4653 chore: Remove 4.2 deprecated functions
parent
8846de838d
commit
602c673e7c
|
@ -37,19 +37,6 @@ import { CoreTimeUtils } from '@services/utils/time';
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class AddonNotificationsHelperProvider {
|
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.
|
* Format preferences data.
|
||||||
*
|
*
|
||||||
|
|
|
@ -304,18 +304,6 @@ export class CoreLoginHelperProvider {
|
||||||
return CorePolicy.getSitePoliciesURL(siteId);
|
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.
|
* 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);
|
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.
|
* Given a site public config, check if email signup is disabled.
|
||||||
*
|
*
|
||||||
|
@ -521,16 +497,6 @@ export class CoreLoginHelperProvider {
|
||||||
return !!disabledFeatures.match(regEx);
|
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).
|
* Check if the app is configured to use a fixed URL (only 1).
|
||||||
*
|
*
|
||||||
|
|
|
@ -287,19 +287,6 @@ export class CoreXAPIProvider {
|
||||||
return site.write<string[]>('core_xapi_get_states', data);
|
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.
|
* Invalidates a state.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue