Update some deprecated function calls
This commit is contained in:
parent
2beb2c514c
commit
a076edc836
4 changed files with 11 additions and 12 deletions
|
@ -274,7 +274,8 @@ Zotero.Sync.Data.Engine.prototype._startDownload = Zotero.Promise.coroutine(func
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newLibraryVersion) {
|
if (newLibraryVersion) {
|
||||||
yield Zotero.Libraries.setVersion(this.libraryID, newLibraryVersion);
|
this.library.libraryVersion = newLibraryVersion;
|
||||||
|
yield this.library.saveTx();
|
||||||
}
|
}
|
||||||
|
|
||||||
return localChanges
|
return localChanges
|
||||||
|
@ -1513,7 +1514,8 @@ Zotero.Sync.Data.Engine.prototype._fullSync = Zotero.Promise.coroutine(function*
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
yield Zotero.Libraries.setVersion(this.libraryID, lastLibraryVersion);
|
this.library.libraryVersion = lastLibraryVersion;
|
||||||
|
yield this.library.saveTx();
|
||||||
|
|
||||||
Zotero.debug("Done with full sync for " + this.library.name);
|
Zotero.debug("Done with full sync for " + this.library.name);
|
||||||
|
|
||||||
|
|
|
@ -1453,7 +1453,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js");
|
||||||
caller.setLogger(Zotero.debug);
|
caller.setLogger(Zotero.debug);
|
||||||
return function () {
|
return function () {
|
||||||
var args = arguments;
|
var args = arguments;
|
||||||
return caller.fcall(function () {
|
return caller.start(function () {
|
||||||
return fn.apply(this, args);
|
return fn.apply(this, args);
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
};
|
};
|
||||||
|
|
|
@ -165,12 +165,6 @@ ConcurrentCaller.prototype.runAll = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ConcurrentCaller.prototype.fcall = function (func) {
|
|
||||||
this._log("fcall() is deprecated -- use start()");
|
|
||||||
return this.start(func);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for all running tasks to complete
|
* Wait for all running tasks to complete
|
||||||
*
|
*
|
||||||
|
|
|
@ -239,8 +239,10 @@ describe("Zotero.Sync.Data.FullTextEngine", function () {
|
||||||
// https://github.com/cjohansen/Sinon.JS/issues/607
|
// https://github.com/cjohansen/Sinon.JS/issues/607
|
||||||
var fixSinonBug = ";charset=utf-8";
|
var fixSinonBug = ";charset=utf-8";
|
||||||
|
|
||||||
var libraryID = Zotero.Libraries.userLibraryID;
|
var library = Zotero.Libraries.userLibrary;
|
||||||
yield Zotero.Libraries.setVersion(libraryID, 5);
|
var libraryID = library.id;
|
||||||
|
library.libraryVersion = 5;
|
||||||
|
yield library.saveTx();
|
||||||
|
|
||||||
({ engine, client, caller } = yield setup());
|
({ engine, client, caller } = yield setup());
|
||||||
|
|
||||||
|
@ -347,7 +349,8 @@ describe("Zotero.Sync.Data.FullTextEngine", function () {
|
||||||
// Upload new content
|
// Upload new content
|
||||||
//
|
//
|
||||||
({ engine, client, caller } = yield setup());
|
({ engine, client, caller } = yield setup());
|
||||||
yield Zotero.Libraries.setVersion(libraryID, libraryVersion);
|
library.libraryVersion = libraryVersion;
|
||||||
|
yield library.saveTx();
|
||||||
|
|
||||||
var attachment3 = new Zotero.Item('attachment');
|
var attachment3 = new Zotero.Item('attachment');
|
||||||
attachment3.parentItemID = item.id;
|
attachment3.parentItemID = item.id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue