`Element with id Assigned To Mehttps://github.com/microsoft/vscode/pull/227347 is already registered` (#6232)
Fixes #6218
This commit is contained in:
Родитель
f6aa0bd6a4
Коммит
1066de65a4
|
@ -204,9 +204,9 @@ export class PrsTreeModel implements vscode.Disposable {
|
|||
return { hasMorePages: false, hasUnsearchedRepositories: false, items: prs };
|
||||
}
|
||||
|
||||
async getPullRequestsForQuery(folderRepoManager: FolderRepositoryManager, fetchNextPage: boolean, query: string, update?: boolean): Promise<ItemsResponseResult<PullRequestModel>> {
|
||||
async getPullRequestsForQuery(folderRepoManager: FolderRepositoryManager, fetchNextPage: boolean, query: string): Promise<ItemsResponseResult<PullRequestModel>> {
|
||||
const cache = this.getFolderCache(folderRepoManager);
|
||||
if (!update && cache.has(query)) {
|
||||
if (!fetchNextPage && cache.has(query)) {
|
||||
return cache.get(query)!;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ import { RemoteFileChangeModel } from './fileChangeModel';
|
|||
import { ReviewManager } from './reviewManager';
|
||||
import { ReviewModel } from './reviewModel';
|
||||
import { GitFileChangeNode, gitFileChangeNodeFilter, RemoteFileChangeNode } from './treeNodes/fileChangeNode';
|
||||
import { IDisposable } from 'cockatiel';
|
||||
|
||||
export interface SuggestionInformation {
|
||||
originalStartLine: number;
|
||||
|
@ -362,7 +361,7 @@ export class ReviewCommentController extends CommentControllerBase
|
|||
this._localToDispose.push(vscode.window.onDidChangeActiveTextEditor(e => this.onDidChangeActiveTextEditor(e)));
|
||||
}
|
||||
|
||||
private _commentContentChangedListner: IDisposable | undefined;
|
||||
private _commentContentChangedListner: vscode.Disposable | undefined;
|
||||
private onDidChangeActiveTextEditor(editor: vscode.TextEditor | undefined) {
|
||||
this._commentContentChangedListner?.dispose();
|
||||
this._commentContentChangedListner = undefined;
|
||||
|
|
|
@ -316,6 +316,8 @@ export class CategoryTreeNode extends TreeNode implements vscode.TreeItem {
|
|||
let hasMorePages = false;
|
||||
let hasUnsearchedRepositories = false;
|
||||
let needLogin = false;
|
||||
const fetchNextPage = this.fetchNextPage;
|
||||
this.fetchNextPage = false;
|
||||
if (this.type === PRType.LocalPullRequest) {
|
||||
try {
|
||||
this.prs = (await this._prsTreeModel.getLocalPullRequests(this._folderRepoManager)).items;
|
||||
|
@ -328,13 +330,13 @@ export class CategoryTreeNode extends TreeNode implements vscode.TreeItem {
|
|||
let response: ItemsResponseResult<PullRequestModel>;
|
||||
switch (this.type) {
|
||||
case PRType.All:
|
||||
response = await this._prsTreeModel.getAllPullRequests(this._folderRepoManager, this.fetchNextPage);
|
||||
response = await this._prsTreeModel.getAllPullRequests(this._folderRepoManager, fetchNextPage);
|
||||
break;
|
||||
case PRType.Query:
|
||||
response = await this._prsTreeModel.getPullRequestsForQuery(this._folderRepoManager, this.fetchNextPage, this._categoryQuery!);
|
||||
response = await this._prsTreeModel.getPullRequestsForQuery(this._folderRepoManager, fetchNextPage, this._categoryQuery!);
|
||||
break;
|
||||
}
|
||||
if (!this.fetchNextPage) {
|
||||
if (!fetchNextPage) {
|
||||
this.prs = response.items;
|
||||
} else {
|
||||
this.prs = this.prs.concat(response.items);
|
||||
|
@ -353,8 +355,6 @@ export class CategoryTreeNode extends TreeNode implements vscode.TreeItem {
|
|||
}
|
||||
});
|
||||
needLogin = e instanceof AuthenticationError;
|
||||
} finally {
|
||||
this.fetchNextPage = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче