Skip to content

Commit dbd4664

Browse files
committed
fix: remove unneeded reloadPage method
1 parent 8069439 commit dbd4664

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

lib/services/livesync/ios-device-livesync-service.ts

+2-19
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
7171
}
7272

7373
if (await this.setupSocketIfNeeded(projectData)) {
74-
await this.liveEdit(scriptFiles);
75-
await this.reloadPage(deviceAppData, otherFiles);
74+
await this.reloadPage(otherFiles);
7675
} else {
7776
await this.restartApplication(deviceAppData, projectData.projectName);
7877
}
@@ -82,7 +81,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
8281
return this.device.applicationManager.restartApplication({ appId: deviceAppData.appIdentifier, projectName });
8382
}
8483

85-
private async reloadPage(deviceAppData: Mobile.IDeviceAppData, localToDevicePaths: Mobile.ILocalToDevicePathData[]): Promise<void> {
84+
private async reloadPage(localToDevicePaths: Mobile.ILocalToDevicePathData[]): Promise<void> {
8685
if (localToDevicePaths.length) {
8786
const message = JSON.stringify({
8887
method: "Page.reload",
@@ -96,22 +95,6 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
9695
}
9796
}
9897

99-
private async liveEdit(localToDevicePaths: Mobile.ILocalToDevicePathData[]): Promise<void> {
100-
for (const localToDevicePath of localToDevicePaths) {
101-
const content = this.$fs.readText(localToDevicePath.getLocalPath());
102-
const message = JSON.stringify({
103-
method: "Debugger.setScriptSource",
104-
params: {
105-
scriptUrl: localToDevicePath.getRelativeToProjectBasePath(),
106-
scriptSource: content
107-
},
108-
id: ++currentPageReloadId
109-
});
110-
111-
await this.sendMessage(message);
112-
}
113-
}
114-
11598
private attachEventHandlers(): void {
11699
this.$processService.attachToProcessExitSignals(this, this.destroySocket);
117100

0 commit comments

Comments
 (0)