mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Clean up and comment
This commit is contained in:
parent
5b140544e0
commit
e11670a872
@ -26,10 +26,6 @@ class FileApiDriverLocal {
|
||||
return output;
|
||||
}
|
||||
|
||||
supportsDelta() {
|
||||
return false;
|
||||
}
|
||||
|
||||
stat(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.stat(path, (error, s) => {
|
||||
|
@ -7,10 +7,6 @@ class FileApiDriverMemory {
|
||||
this.deletedItems_ = [];
|
||||
}
|
||||
|
||||
supportsDelta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
itemIndexByPath(path) {
|
||||
for (let i = 0; i < this.items_.length; i++) {
|
||||
if (this.items_[i].path == path) return i;
|
||||
|
@ -14,10 +14,6 @@ class FileApiDriverOneDrive {
|
||||
return this.api_;
|
||||
}
|
||||
|
||||
supportsDelta() {
|
||||
return true;
|
||||
}
|
||||
|
||||
itemFilter_() {
|
||||
return {
|
||||
select: 'name,file,folder,fileSystemInfo,parentReference',
|
||||
|
@ -23,10 +23,6 @@ class FileApi {
|
||||
return this.syncTargetId_;
|
||||
}
|
||||
|
||||
supportsDelta() {
|
||||
return this.driver_.supportsDelta();
|
||||
}
|
||||
|
||||
setLogger(l) {
|
||||
this.logger_ = l;
|
||||
}
|
||||
|
@ -358,14 +358,14 @@ class Synchronizer {
|
||||
while (true) {
|
||||
if (this.cancelling()) break;
|
||||
|
||||
// let allIds = null;
|
||||
// if (!this.api().supportsDelta()) {
|
||||
// allIds = await BaseItem.syncedItemIds(syncTargetId);
|
||||
// }
|
||||
|
||||
let listResult = await this.api().delta('', {
|
||||
context: context,
|
||||
// itemIds: allIds,
|
||||
|
||||
// allItemIdsHandler() provides a way for drivers that don't have a delta API to
|
||||
// still provide delta functionality by comparing the items they have to the items
|
||||
// the client has. Very inefficient but that's the only possible workaround.
|
||||
// It's a function so that it is only called if the driver needs these IDs. For
|
||||
// drivers with a delta functionality it's a noop.
|
||||
allItemIdsHandler: async () => { return BaseItem.syncedItemIds(syncTargetId); }
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user