@@ -140,13 +140,15 @@ const handleGlobalKeydown = (props, cmController) => (e) => {
140140
141141const autosave = ( autosaveInterval , setAutosaveInterval ) => ( props , prevProps ) => {
142142 const {
143- autosaveProject, preferences, ide, selectedFile : file , project
143+ autosaveProject, preferences, ide, selectedFile : file , project, user
144144 } = props ;
145145
146146 const { selectedFile : oldFile } = prevProps ;
147147
148148 const doAutosave = ( ) => autosaveProject ( true ) ;
149149
150+ console . log ( user ) ;
151+
150152 console . log ( isUserOwner ( props ) , project ) ;
151153
152154 if ( isUserOwner ( props ) && project . id ) {
@@ -209,7 +211,7 @@ const MobileIDEView = (props) => {
209211 // TODO: This behavior could move to <Editor />
210212 const [ autosaveInterval , setAutosaveInterval ] = useState ( null ) ;
211213 useEffectWithComparison ( autosave ( autosaveInterval , setAutosaveInterval ) , {
212- autosaveProject, preferences, ide, selectedFile
214+ autosaveProject, preferences, ide, selectedFile, project , user
213215 } ) ;
214216
215217 useEventListener ( 'keydown' , handleGlobalKeydown ( props , cmController ) , false , [ props ] ) ;
0 commit comments