Don't start transaction to clear search temp table
This might fix loss of item focus when editing a note in a search,
possibly starting with fbf2fbe0c6
.
This commit is contained in:
parent
da387874a2
commit
a70a517f7e
|
@ -2359,11 +2359,12 @@ Zotero.CollectionTreeCache = {
|
||||||
"clear": function () {
|
"clear": function () {
|
||||||
this.lastTreeRow = null;
|
this.lastTreeRow = null;
|
||||||
this.lastSearch = null;
|
this.lastSearch = null;
|
||||||
if(this.lastTempTable) {
|
if (this.lastTempTable) {
|
||||||
// Drop the last temp table when we can. We don't wait on this because it can cause a
|
let tableName = this.lastTempTable;
|
||||||
// deadlock: this waits on open transactions, but a transaction could be waiting on
|
let id = Zotero.DB.addCallback('commit', async function () {
|
||||||
// ItemTreeView::notify(), which waits on ItemTreeView::refresh(), which calls this.
|
await Zotero.DB.queryAsync("DROP TABLE IF EXISTS " + tableName);
|
||||||
Zotero.DB.queryTx("DROP TABLE IF EXISTS " + this.lastTempTable).done();
|
Zotero.DB.removeCallback('commit', id);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
this.lastTempTable = null;
|
this.lastTempTable = null;
|
||||||
this.lastResults = null;
|
this.lastResults = null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user