Ver código fonte

Uses WebviewShowOptions type

main
Eric Amodio 1 ano atrás
pai
commit
07b8798740
3 arquivos alterados com 8 adições e 6 exclusões
  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 Ver arquivo

@ -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 Ver arquivo

@ -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 Ver arquivo

@ -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;

Carregando…
Cancelar
Salvar