@@ -314,19 +314,14 @@ document.addEventListener('alpine:init', () => { Alpine.data('mainApp', () => ({
314314 if ( this . useDirectIpfs && typeof window . ensureIndexFile === 'function' ) {
315315 window . ensureIndexFile ( ) . catch ( err => console . error ( 'IPFS index initialization failed:' , err ) ) ;
316316 }
317-
318- // Delay initial sync to prioritize local UI snappiness and "offline-first" feel
319- setTimeout ( ( ) => {
320- this . syncNotes ( true , 0 , null , true ) ; // Silent sync on startup
321- } , 5000 ) ;
322317 } )
323318
324319 setTimeout ( ( ) => {
325- this . syncNotes ( true ) ;
326- } , 3e3 ) ;
320+ this . syncNotes ( false , 0 , null , true ) ;
321+ } , 5e3 ) ;
327322 this . syncIntervalId = setInterval ( ( ) => {
328- this . syncNotes ( true ) ; // Run a silent sync
329- } , 2 * 60 * 1000 ) ; // Every 2 minutes
323+ this . syncNotes ( false , 0 , null , true ) ;
324+ } , 60e3 ) ;
330325
331326 window . addEventListener ( 'online' , ( ) => {
332327 this . showToast ( { title : 'Online' , description : 'Connection restored. Syncing...' , quiet : true } ) ;
@@ -361,7 +356,7 @@ document.addEventListener('alpine:init', () => { Alpine.data('mainApp', () => ({
361356 } else if ( event . key === 'Escape' ) {
362357 if ( this . editingNoteId ) {
363358 event . preventDefault ( ) ;
364- ( this . noteEditorContent != window . easyMDEInstance ?. value ( ) ) && confirm ( 'Save note before closing?' ) && this . saveNote ( true ) ;
359+ // (this.noteEditorContent != window.easyMDEInstance?.value()) && confirm('Save note before closing?') && this.saveNote(true);
365360 this . cancelEdit ( ) ;
366361 }
367362 }
0 commit comments