Pull out getFromQueryToCompare
This commit is contained in:
@@ -592,12 +592,7 @@ export class QueryHistoryManager extends DisposableObject {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const fromItem =
|
const fromItem = this.getFromQueryToCompare(singleItem, multiSelect);
|
||||||
this.compareWithItem &&
|
|
||||||
this.isSuccessfulCompletedLocalQueryInfo(this.compareWithItem) &&
|
|
||||||
multiSelect.includes(this.compareWithItem)
|
|
||||||
? this.compareWithItem
|
|
||||||
: singleItem;
|
|
||||||
|
|
||||||
let toItem: CompletedLocalQueryInfo | undefined = undefined;
|
let toItem: CompletedLocalQueryInfo | undefined = undefined;
|
||||||
try {
|
try {
|
||||||
@@ -1070,6 +1065,21 @@ export class QueryHistoryManager extends DisposableObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private getFromQueryToCompare(
|
||||||
|
singleItem: CompletedLocalQueryInfo,
|
||||||
|
multiSelect: CompletedLocalQueryInfo[],
|
||||||
|
): CompletedLocalQueryInfo {
|
||||||
|
if (
|
||||||
|
this.compareWithItem &&
|
||||||
|
this.isSuccessfulCompletedLocalQueryInfo(this.compareWithItem) &&
|
||||||
|
multiSelect.includes(this.compareWithItem)
|
||||||
|
) {
|
||||||
|
return this.compareWithItem;
|
||||||
|
} else {
|
||||||
|
return singleItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private async findOtherQueryToCompare(
|
private async findOtherQueryToCompare(
|
||||||
fromItem: CompletedLocalQueryInfo,
|
fromItem: CompletedLocalQueryInfo,
|
||||||
allItemsSelected: CompletedLocalQueryInfo[],
|
allItemsSelected: CompletedLocalQueryInfo[],
|
||||||
|
|||||||
Reference in New Issue
Block a user