From f570988814d7cdb925a775019369ad4d26237e5d Mon Sep 17 00:00:00 2001 From: xevidos Date: Mon, 6 May 2019 09:12:57 -0400 Subject: [PATCH] Enabled logging for autosave, Updated ReadMe --- README.md | 9 ++++++--- components/autosave/init.js | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 2dd9145..f438534 100755 --- a/README.md +++ b/README.md @@ -9,11 +9,13 @@ Distributed under the MIT-Style License. See LICENSE.txt file for more informati Repositories: [GitLab](https://gitlab.com/xevidos/codiad) + [GitHub](https://github.com/xevidos/codiad) Issues: [GitLab](https://gitlab.com/xevidos/codiad/issues) + [GitHub](https://github.com/xevidos/codiad/issues) Features: @@ -72,6 +74,7 @@ Completed: Known Bugs: -* Auto save does not save the most recent changes every once in a while requiring more information to be typed ( E.G. A couple spaces ) in order to show up in saved file. -* Cursor is set to the wrong position if in split view. -* On certain enviroments the update script pulls the old version of the sql class causing the update to fail. \ No newline at end of file +* Auto save does not save the most recent changes every once in a while requiring more information to be typed ( E.G. A couple spaces ) in order to show up in saved file +* Cursor is set to the wrong position if in split view +* In certain enviroments the update script pulls the old version of the sql class causing the update to fail +* The Server has new version of file alert causes auto save to stop when the user presses okay \ No newline at end of file diff --git a/components/autosave/init.js b/components/autosave/init.js index d25847b..2e02cc2 100755 --- a/components/autosave/init.js +++ b/components/autosave/init.js @@ -44,7 +44,7 @@ autosave: true, toggle: true, }, - verbose: false, + verbose: true, init: async function() { @@ -110,6 +110,10 @@ * try to close it, the program will throw an exception and * stop you from closing the file */ + if( codiad.auto_save.verbose ) { + + console.log( "Error removing event listener", e ); + } } }); @@ -251,7 +255,13 @@ window.clearInterval( codiad.autosave.auto_save_trigger ); window.clearInterval( this.auto_save_trigger ); - } catch( error ) {} + } catch( error ) { + + if( codiad.auto_save.verbose ) { + + console.log( "Error clearing interval", error ); + } + } if( codiad.auto_save.settings.autosave == true || codiad.auto_save.settings.autosave == "true" ) {