[sync] bugfix (file wasn't created if not found)

also, set sync delay to 5 seconds
This commit is contained in:
fkloft 2014-10-09 20:21:35 +02:00
parent 1f8f536040
commit 47c1bc97d6
4 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@
// use own namespace for plugin
window.plugin.bookmarks = function() {};
window.plugin.bookmarks.SYNC_DELAY = 5;
window.plugin.bookmarks.SYNC_DELAY = 5000;
window.plugin.bookmarks.KEY_OTHER_BKMRK = 'idOthers';
window.plugin.bookmarks.KEY_STORAGE = 'plugin-bookmarks';

View File

@ -22,7 +22,7 @@
window.plugin.keys = function() {};
// delay in ms
window.plugin.keys.SYNC_DELAY = 10000;
window.plugin.keys.SYNC_DELAY = 5000;
window.plugin.keys.LOCAL_STORAGE_KEY = 'plugin-keys-data';

View File

@ -440,7 +440,7 @@ window.plugin.sync.FileSearcher.prototype.initFile = function(assignIdCallback,
};
searchCallback = function(resp) {
if(resp.items) {
if(resp.items && resp.items[0]) {
handleFileId(resp.items[0].id);// file found
} else if(!resp.error) {
_this.createFileOrFolder(createCallback); // file not found, create file

View File

@ -21,7 +21,7 @@
window.plugin.uniques = function() {};
//delay in ms
window.plugin.uniques.SYNC_DELAY = 10000;
window.plugin.uniques.SYNC_DELAY = 5000;
// maps the JS property names to localStorage keys
window.plugin.uniques.FIELDS = {