mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
Don't auto-select item after sync on upload error
Bug from 2017
This commit is contained in:
parent
e3387bbe96
commit
8642091d8e
1 changed files with 15 additions and 11 deletions
|
|
@ -913,14 +913,25 @@ Zotero.Sync.Runner_Module = function (options = {}) {
|
|||
}
|
||||
|
||||
|
||||
this.end = Zotero.Promise.coroutine(function* (options) {
|
||||
this.end = async function (options) {
|
||||
_syncInProgress = false;
|
||||
yield this.checkErrors(_errors, options);
|
||||
await this.checkErrors(_errors, options);
|
||||
if (!options.restartSync) {
|
||||
this.updateIcons(_errors);
|
||||
|
||||
// If foreground sync, trigger dialog button immediately for some errors
|
||||
// (e.g., long tag fixer)
|
||||
if (!options.background && _errors.length) {
|
||||
if (_errors[0].dialogButtonImmediate) {
|
||||
let maybePromise = _errors[0].dialogButtonCallback();
|
||||
if (maybePromise && maybePromise.then) {
|
||||
await maybePromise;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_errors = [];
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1253,6 +1264,7 @@ Zotero.Sync.Runner_Module = function (options = {}) {
|
|||
|
||||
options.restartSync = true;
|
||||
});
|
||||
e.dialogButtonImmediate = true;
|
||||
}
|
||||
else {
|
||||
// Note too long
|
||||
|
|
@ -1296,14 +1308,6 @@ Zotero.Sync.Runner_Module = function (options = {}) {
|
|||
};
|
||||
}
|
||||
}
|
||||
|
||||
// If not a background sync, show dialog immediately
|
||||
if (!options.background && e.dialogButtonCallback) {
|
||||
let maybePromise = e.dialogButtonCallback();
|
||||
if (maybePromise && maybePromise.then) {
|
||||
yield maybePromise;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Show warning for unknown data that couldn't be saved
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue