File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ const IDEView = (props) => {
88
88
const autosaveIntervalRef = useRef ( null ) ;
89
89
90
90
const prevFileNameRef = useRef ( selectedFile . name ) ;
91
- const prevFileContentRef = useRef ( selectedFile . content ) ;
92
91
const locationRef = useRef ( props . location ) ;
93
92
94
93
const syncFileContent = ( ) => {
@@ -122,10 +121,10 @@ const IDEView = (props) => {
122
121
preferences . autosave &&
123
122
ide . unsavedChanges &&
124
123
! ide . justOpenedProject &&
125
- selectedFile . name === prevFileNameRef . current &&
126
- selectedFile . content !== prevFileContentRef . current
124
+ selectedFile . name === prevFileNameRef . current
127
125
) {
128
126
dispatch ( autosaveProject ( ) ) ;
127
+ console . log ( 'saveee' ) ;
129
128
}
130
129
} ;
131
130
@@ -134,10 +133,9 @@ const IDEView = (props) => {
134
133
}
135
134
136
135
if ( preferences . autosave ) {
137
- autosaveIntervalRef . current = setTimeout ( handleAutosave , 20000 ) ;
136
+ autosaveIntervalRef . current = setTimeout ( handleAutosave , 10000 ) ;
138
137
}
139
138
prevFileNameRef . current = selectedFile . name ;
140
- prevFileContentRef . current = selectedFile . content ;
141
139
142
140
return ( ) => {
143
141
if ( autosaveIntervalRef . current ) {
@@ -151,7 +149,6 @@ const IDEView = (props) => {
151
149
ide . unsavedChanges ,
152
150
ide . justOpenedProject ,
153
151
selectedFile . name ,
154
- selectedFile . content ,
155
152
dispatch ,
156
153
autosaveProject
157
154
] ) ;
You can’t perform that action at this time.
0 commit comments