@@ -1039,20 +1039,19 @@ export class CoreSitesProvider {
10391039 /**
10401040 * Check the app for a site and show a download dialogs if necessary.
10411041 *
1042- * @param response Data obtained during site check .
1042+ * @param config Config object of the site .
10431043 */
1044- async checkApplication ( response : CoreSiteCheckResponse ) : Promise < void > {
1045- await this . checkRequiredMinimumVersion ( response . config ) ;
1044+ async checkApplication ( config : any ) : Promise < void > {
1045+ await this . checkRequiredMinimumVersion ( config ) ;
10461046 }
10471047
10481048 /**
10491049 * Check the required minimum version of the app for a site and shows a download dialog.
10501050 *
1051- * @param config Config object of the site.
1052- * @param siteId ID of the site to check. Current site id will be used otherwise.
1051+ * @param config Config object of the site.
10531052 * @return Resolved with if meets the requirements, rejected otherwise.
10541053 */
1055- checkRequiredMinimumVersion ( config : any , siteId ?: string ) : Promise < void > {
1054+ protected checkRequiredMinimumVersion ( config : any ) : Promise < void > {
10561055 if ( config && config . tool_mobile_minimumversion ) {
10571056 const requiredVersion = this . convertVersionName ( config . tool_mobile_minimumversion ) ,
10581057 appVersion = this . convertVersionName ( CoreConfigConstants . versionname ) ;
@@ -1067,8 +1066,7 @@ export class CoreSitesProvider {
10671066 } ;
10681067
10691068 const downloadUrl = this . appProvider . getAppStoreUrl ( storesConfig ) ;
1070-
1071- siteId = siteId || this . getCurrentSiteId ( ) ;
1069+ const siteId = this . getCurrentSiteId ( ) ;
10721070
10731071 // Do not block interface.
10741072 this . domUtils . showConfirm (
@@ -1159,7 +1157,7 @@ export class CoreSitesProvider {
11591157 return site . getPublicConfig ( ) . catch ( ( ) => {
11601158 return { } ;
11611159 } ) . then ( ( config ) => {
1162- return this . checkRequiredMinimumVersion ( config ) . then ( ( ) => {
1160+ return this . checkApplication ( config ) . then ( ( ) => {
11631161 this . login ( siteId ) ;
11641162
11651163 // Update site info. We don't block the UI.
0 commit comments