Sfoglia il codice sorgente

Removes unused code

main
Eric Amodio 1 anno fa
parent
commit
62dbdc6ada
4 ha cambiato i file con 2 aggiunte e 37 eliminazioni
  1. +2
    -1
      src/constants.ts
  2. +0
    -24
      src/plus/webviews/graph/graphWebview.ts
  3. +0
    -6
      src/plus/webviews/graph/protocol.ts
  4. +0
    -6
      src/webviews/apps/plus/graph/graph.tsx

+ 2
- 1
src/constants.ts Vedi File

@ -636,6 +636,8 @@ export type GlobalStorage = {
export type DeprecatedWorkspaceStorage = {
/** @deprecated use `confirm:ai:send:openai` */
'confirm:sendToOpenAI': boolean;
/** @deprecated */
'graph:banners:dismissed': Record<string, boolean>;
/** @deprecated use `graph:filtersByRepo.excludeRefs` */
'graph:hiddenRefs': Record<string, StoredGraphExcludedRef>;
/** @deprecated use `views:searchAndCompare:pinned` */
@ -647,7 +649,6 @@ export type WorkspaceStorage = {
'branch:comparisons': StoredBranchComparisons;
'gitComandPalette:usage': RecentUsage;
gitPath: string;
'graph:banners:dismissed': Record<string, boolean>;
'graph:columns': Record<string, StoredGraphColumn>;
'graph:filtersByRepo': Record<string, StoredGraphFilters>;
'remote:default': string;

+ 0
- 24
src/plus/webviews/graph/graphWebview.ts Vedi File

@ -91,7 +91,6 @@ import type { SubscriptionChangeEvent } from '../../subscription/subscriptionSer
import type {
BranchState,
DimMergeCommitsParams,
DismissBannerParams,
DoubleClickedParams,
EnsureRowParams,
GetMissingAvatarsParams,
@ -159,7 +158,6 @@ import {
DidFetchNotificationType,
DidSearchNotificationType,
DimMergeCommitsCommandType,
DismissBannerCommandType,
DoubleClickedCommandType,
EnsureRowCommandType,
GetMissingAvatarsCommandType,
@ -249,7 +247,6 @@ export class GraphWebviewProvider implements WebviewProvider {
private _repositoryEventsDisposable: Disposable | undefined;
private _lastFetchedDisposable: Disposable | undefined;
private trialBanner?: boolean;
private isWindowFocused: boolean = true;
constructor(private readonly container: Container, private readonly host: WebviewController<State>) {
@ -514,9 +511,6 @@ export class GraphWebviewProvider implements WebviewProvider {
case DimMergeCommitsCommandType.method:
onIpc(DimMergeCommitsCommandType, e, params => this.dimMergeCommits(params));
break;
case DismissBannerCommandType.method:
onIpc(DismissBannerCommandType, e, params => this.dismissBanner(params));
break;
case DoubleClickedCommandType.method:
onIpc(DoubleClickedCommandType, e, params => this.onDoubleClick(params));
break;
@ -735,16 +729,6 @@ export class GraphWebviewProvider implements WebviewProvider {
void configuration.updateEffective('graph.dimMergeCommits', e.dim);
}
private dismissBanner(e: DismissBannerParams) {
if (e.key === 'trial') {
this.trialBanner = false;
}
let banners = this.container.storage.getWorkspace('graph:banners:dismissed');
banners = updateRecordValue(banners, e.key, true);
void this.container.storage.storeWorkspace('graph:banners:dismissed', banners);
}
private onColumnsChanged(e: UpdateColumnsParams) {
this.updateColumns(e.config);
}
@ -1858,13 +1842,6 @@ export class GraphWebviewProvider implements WebviewProvider {
return { timestamp: Date.now(), allowed: true, repositories: [] };
}
if (this.trialBanner == null) {
const banners = this.container.storage.getWorkspace('graph:banners:dismissed');
if (this.trialBanner == null) {
this.trialBanner = !banners?.['trial'];
}
}
if (this.repository == null) {
this.repository = this.container.git.getBestRepositoryOrFirst();
if (this.repository == null) {
@ -1950,7 +1927,6 @@ export class GraphWebviewProvider implements WebviewProvider {
return {
timestamp: Date.now(),
windowFocused: this.isWindowFocused,
trialBanner: this.trialBanner,
repositories: formatRepositories(this.container.git.openRepositories),
selectedRepository: this.repository.path,
selectedRepositoryVisibility: visibility,

+ 0
- 6
src/plus/webviews/graph/protocol.ts Vedi File

@ -108,7 +108,6 @@ export interface State {
config?: GraphComponentConfig;
context?: GraphContexts & { settings?: SerializedGraphItemContext };
nonce?: string;
trialBanner?: boolean;
workingTreeStats?: GraphWorkingTreeStats;
searchResults?: DidSearchParams['results'];
excludeRefs?: GraphExcludeRefs;
@ -219,11 +218,6 @@ export interface DimMergeCommitsParams {
}
export const DimMergeCommitsCommandType = new IpcCommandType<DimMergeCommitsParams>('graph/dimMergeCommits');
export interface DismissBannerParams {
key: 'preview' | 'trial';
}
export const DismissBannerCommandType = new IpcCommandType<DismissBannerParams>('graph/dismissBanner');
export type DoubleClickedParams =
| {
type: 'ref';

+ 0
- 6
src/webviews/apps/plus/graph/graph.tsx Vedi File

@ -5,7 +5,6 @@ import { render, unmountComponentAtNode } from 'react-dom';
import type { GitGraphRowType } from '../../../../git/models/graph';
import type { SearchQuery } from '../../../../git/search';
import type {
DismissBannerParams,
GraphAvatars,
GraphColumnsConfig,
GraphExcludedRef,
@ -37,7 +36,6 @@ import {
DidFetchNotificationType,
DidSearchNotificationType,
DimMergeCommitsCommandType,
DismissBannerCommandType,
DoubleClickedCommandType,
EnsureRowCommandType,
GetMissingAvatarsCommandType,
@ -555,10 +553,6 @@ export class GraphApp extends App {
};
}
private onDismissBanner(key: DismissBannerParams['key']) {
this.sendCommand(DismissBannerCommandType, { key: key });
}
private onColumnsChanged(settings: GraphColumnsConfig) {
this.sendCommand(UpdateColumnsCommandType, {
config: settings,

Caricamento…
Annulla
Salva