Skip to content

Commit 6bee138

Browse files
committed
chore: refactor - move the private isPlatformAdded method at the end of the class
1 parent 3b1ccec commit 6bee138

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/services/platform-service.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,6 @@ export class PlatformService extends EventEmitter implements IPlatformService {
7878
}
7979
}
8080

81-
private isPlatformAdded(platform: string, platformPath: string, projectData: IProjectData): boolean {
82-
if (!this.$fs.exists(platformPath)) {
83-
return false;
84-
}
85-
86-
const prepareInfo = this.$projectChangesService.getPrepareInfo(platform, projectData);
87-
if (!prepareInfo) {
88-
return true;
89-
}
90-
91-
return prepareInfo.nativePlatformStatus !== constants.NativePlatformStatus.requiresPlatformAdd;
92-
}
93-
9481
public getCurrentPlatformVersion(platform: string, projectData: IProjectData): string {
9582
const platformData = this.$platformsData.getPlatformData(platform, projectData);
9683
const currentPlatformData: any = this.$projectDataService.getNSValue(projectData.projectDir, platformData.frameworkPackageName);
@@ -979,6 +966,19 @@ export class PlatformService extends EventEmitter implements IPlatformService {
979966

980967
return null;
981968
}
969+
970+
private isPlatformAdded(platform: string, platformPath: string, projectData: IProjectData): boolean {
971+
if (!this.$fs.exists(platformPath)) {
972+
return false;
973+
}
974+
975+
const prepareInfo = this.$projectChangesService.getPrepareInfo(platform, projectData);
976+
if (!prepareInfo) {
977+
return true;
978+
}
979+
980+
return prepareInfo.nativePlatformStatus !== constants.NativePlatformStatus.requiresPlatformAdd;
981+
}
982982
}
983983

984984
$injector.register("platformService", PlatformService);

0 commit comments

Comments
 (0)