瀏覽代碼

Uses WebviewShowOptions type

main
Eric Amodio 1 年之前
父節點
當前提交
07b8798740
共有 3 個文件被更改,包括 8 次插入6 次删除
  1. +3
    -3
      src/plus/webviews/graph/graphWebview.ts
  2. +1
    -1
      src/plus/webviews/timeline/timelineWebview.ts
  3. +4
    -2
      src/webviews/webviewsController.ts

+ 3
- 3
src/plus/webviews/graph/graphWebview.ts 查看文件

@ -1,4 +1,4 @@
import type { ColorTheme, ConfigurationChangeEvent, Uri, ViewColumn } from 'vscode';
import type { ColorTheme, ConfigurationChangeEvent, Uri } from 'vscode';
import { CancellationTokenSource, Disposable, env, window } from 'vscode';
import type { CreatePullRequestActionContext } from '../../../api/gitlens';
import { getAvatarUri } from '../../../avatars';
@ -84,7 +84,7 @@ import { RepositoryFolderNode } from '../../../views/nodes/abstract/repositoryFo
import type { IpcMessage, IpcNotificationType } from '../../../webviews/protocol';
import { onIpc } from '../../../webviews/protocol';
import type { WebviewController, WebviewProvider, WebviewShowingArgs } from '../../../webviews/webviewController';
import type { WebviewPanelShowCommandArgs } from '../../../webviews/webviewsController';
import type { WebviewPanelShowCommandArgs, WebviewShowOptions } from '../../../webviews/webviewsController';
import { isSerializedState } from '../../../webviews/webviewsController';
import type { SubscriptionChangeEvent } from '../../gk/account/subscriptionService';
import type {
@ -313,7 +313,7 @@ export class GraphWebviewProvider implements WebviewProvider
async onShowing(
loading: boolean,
_options: { column?: ViewColumn; preserveFocus?: boolean },
_options?: WebviewShowOptions,
...args: WebviewShowingArgs<GraphWebviewShowingArgs, State>
): Promise<boolean> {
this._firstSelection = true;

+ 1
- 1
src/plus/webviews/timeline/timelineWebview.ts 查看文件

@ -112,7 +112,7 @@ export class TimelineWebviewProvider implements WebviewProvider
onShowing(
loading: boolean,
_options: WebviewShowOptions | undefined,
_options?: WebviewShowOptions,
...args: WebviewShowingArgs<TimelineWebviewShowingArgs, State>
): boolean {
const [arg] = args;

+ 4
- 2
src/webviews/webviewsController.ts 查看文件

@ -399,9 +399,10 @@ export class WebviewsController implements Disposable {
}
}
interface WebviewPanelShowOptions {
export interface WebviewPanelShowOptions {
column?: ViewColumn;
preserveFocus?: boolean;
preserveVisibility?: boolean;
}
interface WebviewPanelsShowOptions extends WebviewPanelShowOptions {
@ -413,9 +414,10 @@ export type WebviewPanelShowCommandArgs = [
...args: unknown[],
];
interface WebviewViewShowOptions {
export interface WebviewViewShowOptions {
column?: never;
preserveFocus?: boolean;
preserveVisibility?: boolean;
}
export type WebviewShowOptions = WebviewPanelShowOptions | WebviewViewShowOptions;

Loading…
取消
儲存