@@ -23,7 +23,11 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
23
23
super ( platformsDataService , device ) ;
24
24
}
25
25
26
- private canRefreshWithNotification ( projectData : IProjectData ) : boolean {
26
+ private canRefreshWithNotification ( projectData : IProjectData , liveSyncInfo ?: ILiveSyncResultInfo ) : boolean {
27
+ if ( liveSyncInfo && liveSyncInfo . forceRefreshWithSocket ) {
28
+ return false ;
29
+ }
30
+
27
31
if ( this . device . isEmulator ) {
28
32
return false ;
29
33
}
@@ -72,7 +76,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
72
76
shouldRestart = true ;
73
77
} else {
74
78
const canExecuteFastSync = this . canExecuteFastSyncForPaths ( liveSyncInfo , localToDevicePaths , projectData , deviceAppData . platform ) ;
75
- const isRefreshConnectionSetup = this . canRefreshWithNotification ( projectData ) || ( ! this . device . isOnlyWiFiConnected && await this . setupSocketIfNeeded ( projectData ) ) ;
79
+ const isRefreshConnectionSetup = this . canRefreshWithNotification ( projectData , liveSyncInfo ) || ( ! this . device . isOnlyWiFiConnected && await this . setupSocketIfNeeded ( projectData ) ) ;
76
80
if ( ! canExecuteFastSync || ! isRefreshConnectionSetup ) {
77
81
shouldRestart = true ;
78
82
}
@@ -93,7 +97,7 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
93
97
94
98
try {
95
99
if ( otherFiles . length ) {
96
- didRefresh = await this . refreshApplicationCore ( projectData ) ;
100
+ didRefresh = await this . refreshApplicationCore ( projectData , liveSyncInfo ) ;
97
101
}
98
102
} catch ( e ) {
99
103
didRefresh = false ;
@@ -102,9 +106,9 @@ export class IOSDeviceLiveSyncService extends DeviceLiveSyncServiceBase implemen
102
106
return didRefresh ;
103
107
}
104
108
105
- private async refreshApplicationCore ( projectData : IProjectData ) {
109
+ private async refreshApplicationCore ( projectData : IProjectData , liveSyncInfo : ILiveSyncResultInfo ) {
106
110
let didRefresh = true ;
107
- if ( this . canRefreshWithNotification ( projectData ) ) {
111
+ if ( this . canRefreshWithNotification ( projectData , liveSyncInfo ) ) {
108
112
didRefresh = await this . refreshWithNotification ( projectData ) ;
109
113
} else {
110
114
if ( await this . setupSocketIfNeeded ( projectData ) ) {
0 commit comments