Browse Source

Consolidates reset commands

main
Eric Amodio 2 years ago
parent
commit
749fccc710
4 changed files with 30 additions and 35 deletions
  1. +1
    -2
      src/commands.ts
  2. +0
    -16
      src/commands/resetAvatarCache.ts
  3. +12
    -0
      src/commands/resets.ts

+ 1
- 2
src/commands.ts View File

@ -40,8 +40,7 @@ export * from './commands/rebaseEditor';
export * from './commands/refreshHover';
export * from './commands/remoteProviders';
export * from './commands/repositories';
export * from './commands/resetAvatarCache';
export * from './commands/resetSuppressedWarnings';
export * from './commands/resets';
export * from './commands/setViewsLayout';
export * from './commands/searchCommits';
export * from './commands/showCommitsInView';

+ 0
- 16
src/commands/resetAvatarCache.ts View File

@ -1,16 +0,0 @@
import { resetAvatarCache } from '../avatars';
import { Commands } from '../constants';
import type { Container } from '../container';
import { command } from '../system/command';
import { Command } from './base';
@command()
export class ResetAvatarCacheCommand extends Command {
constructor(private readonly container: Container) {
super(Commands.ResetAvatarCache);
}
execute() {
resetAvatarCache('all');
}
}

src/commands/resetSuppressedWarnings.ts → src/commands/resets.ts View File

@ -1,4 +1,5 @@
import { ConfigurationTarget } from 'vscode';
import { resetAvatarCache } from '../avatars';
import { configuration } from '../configuration';
import { Commands } from '../constants';
import type { Container } from '../container';
@ -6,6 +7,17 @@ import { command } from '../system/command';
import { Command } from './base';
@command()
export class ResetAvatarCacheCommand extends Command {
constructor(private readonly container: Container) {
super(Commands.ResetAvatarCache);
}
execute() {
resetAvatarCache('all');
}
}
@command()
export class ResetSuppressedWarningsCommand extends Command {
constructor(private readonly container: Container) {
super(Commands.ResetSuppressedWarnings);

Loading…
Cancel
Save