@@ -39,8 +39,6 @@ import {
39
39
SHOW_EXPORT_SPACE_PROMPT_CHANNEL ,
40
40
RESPOND_EXPORT_SPACE_PROMPT_CHANNEL ,
41
41
SAVE_SPACE_CHANNEL ,
42
- SHOW_SYNC_SPACE_PROMPT_CHANNEL ,
43
- RESPOND_SYNC_SPACE_PROMPT_CHANNEL ,
44
42
SYNC_SPACE_CHANNEL ,
45
43
SYNCED_SPACE_CHANNEL ,
46
44
CLEAR_USER_INPUT_CHANNEL ,
@@ -147,25 +145,25 @@ const getRemoteSpace = async ({ id }) => async dispatch => {
147
145
await isErrorResponse ( response ) ;
148
146
149
147
const remoteSpace = await response . json ( ) ;
150
- let localSpace = { } ;
151
-
152
- // try to merge with local space if available
153
- try {
154
- window . ipcRenderer . send ( GET_SPACE_CHANNEL , { id } ) ;
155
- localSpace = await waitForSpace ( { online : true } ) ;
156
- } catch ( localError ) {
157
- // ignore error
158
- }
148
+ // let localSpace = {};
149
+
150
+ // // try to merge with local space if available
151
+ // try {
152
+ // window.ipcRenderer.send(GET_SPACE_CHANNEL, { id });
153
+ // localSpace = await waitForSpace({ online: true });
154
+ // } catch (localError) {
155
+ // // ignore error
156
+ // }
159
157
160
158
// in the future we could probably try to deep merge
161
- const space = {
162
- ...remoteSpace ,
163
- ...localSpace ,
164
- } ;
159
+ // const space = {
160
+ // ...remoteSpace,
161
+ // ...localSpace,
162
+ // };
165
163
166
164
dispatch ( {
167
165
type : GET_SPACE_SUCCEEDED ,
168
- payload : space ,
166
+ payload : remoteSpace ,
169
167
} ) ;
170
168
} catch ( err ) {
171
169
toastr . error ( ERROR_MESSAGE_HEADER , ERROR_GETTING_SPACE_MESSAGE ) ;
@@ -342,17 +340,8 @@ const syncSpace = async ({ id }) => async dispatch => {
342
340
await isErrorResponse ( response ) ;
343
341
const remoteSpace = await response . json ( ) ;
344
342
345
- // show confirmation prompt
346
- window . ipcRenderer . send ( SHOW_SYNC_SPACE_PROMPT_CHANNEL ) ;
347
-
348
- // this runs when the user has responded to the sync dialog
349
- window . ipcRenderer . once ( RESPOND_SYNC_SPACE_PROMPT_CHANNEL , ( event , res ) => {
350
- // only sync the space if the response is positive
351
- if ( res === 1 ) {
352
- dispatch ( flagSyncingSpace ( true ) ) ;
353
- window . ipcRenderer . send ( SYNC_SPACE_CHANNEL , { remoteSpace } ) ;
354
- }
355
- } ) ;
343
+ dispatch ( flagSyncingSpace ( true ) ) ;
344
+ window . ipcRenderer . send ( SYNC_SPACE_CHANNEL , { remoteSpace } ) ;
356
345
357
346
// this runs once the space has been synced
358
347
window . ipcRenderer . once ( SYNCED_SPACE_CHANNEL , ( event , res ) => {
0 commit comments