Skip to content

Commit 688e431

Browse files
committed
chore: improve code
1 parent d9f8cb8 commit 688e431

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/services/livesync/android-device-livesync-sockets-service.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
3232
const canExecuteFastSync = !liveSyncInfo.isFullSync && !_.some(liveSyncInfo.modifiedFilesData,
3333
(localToDevicePath: Mobile.ILocalToDevicePathData) => !this.canExecuteFastSync(localToDevicePath.getLocalPath(), projectData, this.device.deviceInfo.platform));
3434

35-
if(!canExecuteFastSync && liveSyncInfo.modifiedFilesData.length) {
36-
await this.livesyncTool.sendDoSyncOperation();
37-
await this.device.applicationManager.restartApplication({ appId: liveSyncInfo.deviceAppData.appIdentifier, projectName: projectData.projectName });
38-
} else if(liveSyncInfo.modifiedFilesData.length) {
35+
if(liveSyncInfo.modifiedFilesData.length) {
3936
await this.livesyncTool.sendDoSyncOperation();
37+
38+
if(!canExecuteFastSync){
39+
await this.device.applicationManager.restartApplication({ appId: liveSyncInfo.deviceAppData.appIdentifier, projectName: projectData.projectName });
40+
}
4041
}
4142

4243
this.livesyncTool.end();

0 commit comments

Comments
 (0)