@@ -70,13 +70,13 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
7070 if ( isFullSync ) {
7171 transferredFiles = await this . _transferDirectory ( deviceAppData , localToDevicePaths , projectFilesPath ) ;
7272 } else {
73- transferredFiles = await this . _transferFiles ( deviceAppData , localToDevicePaths , projectFilesPath ) ;
73+ transferredFiles = await this . _transferFiles ( localToDevicePaths ) ;
7474 }
7575
7676 return transferredFiles ;
7777 }
7878
79- private async _transferFiles ( deviceAppData : Mobile . IDeviceAppData , localToDevicePaths : Mobile . ILocalToDevicePathData [ ] , projectFilesPath : string ) : Promise < Mobile . ILocalToDevicePathData [ ] > {
79+ private async _transferFiles ( localToDevicePaths : Mobile . ILocalToDevicePathData [ ] ) : Promise < Mobile . ILocalToDevicePathData [ ] > {
8080 await this . livesyncTool . sendFiles ( localToDevicePaths . map ( localToDevicePathData => localToDevicePathData . getLocalPath ( ) ) ) ;
8181
8282 return localToDevicePaths ;
@@ -94,15 +94,11 @@ export class AndroidDeviceSocketsLiveSyncService extends DeviceLiveSyncServiceBa
9494 transferedFiles = localToDevicePaths ;
9595 } else {
9696 const changedShasums = deviceHashService . getChnagedShasums ( oldShasums , currentShasums ) ;
97- const changedFiles = _ . map ( changedShasums , ( hash : string , pathToFile : string ) => pathToFile ) ;
97+ const changedFiles = _ . keys ( changedShasums ) ;
9898 if ( changedFiles . length ) {
9999 await this . livesyncTool . sendFiles ( changedFiles ) ;
100100 await deviceHashService . uploadHashFileToDevice ( currentShasums ) ;
101- transferedFiles = localToDevicePaths . filter ( localToDevicePathData => {
102- if ( changedFiles . indexOf ( localToDevicePathData . getLocalPath ( ) ) >= 0 ) {
103- return true ;
104- }
105- } ) ;
101+ transferedFiles = localToDevicePaths . filter ( localToDevicePathData => changedFiles . indexOf ( localToDevicePathData . getLocalPath ( ) ) >= 0 ) ;
106102 } else {
107103 transferedFiles = [ ] ;
108104 }
0 commit comments