From 752912d49d26a26eda06f88880c429e4bdc971a1 Mon Sep 17 00:00:00 2001 From: octod Date: Mon, 24 Jul 2017 11:05:15 +0200 Subject: [PATCH] chore: Automatically reloads window after an accent change. --- extensions/commands/accents-setter/index.ts | 4 ++-- extensions/commands/theme-icons/index.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/commands/accents-setter/index.ts b/extensions/commands/accents-setter/index.ts index 0432b20..c19bf4e 100644 --- a/extensions/commands/accents-setter/index.ts +++ b/extensions/commands/accents-setter/index.ts @@ -4,7 +4,7 @@ import {IAccentCustomProperty} from '../../interfaces/iaccent-custom-property'; import { IDefaults } from "../../interfaces/idefaults"; import {IGenericObject} from '../../interfaces/igeneric-object'; import { updateAccent, isMaterialTheme, isMaterialThemeIcons } from "../../helpers/settings"; -import { getCurrentThemeID, getCurrentThemeIconsID, askForWindowReload } from "../../helpers/vscode"; +import { getCurrentThemeID, getCurrentThemeIconsID, reloadWindow } from "../../helpers/vscode"; import { THEME_ICONS } from "../theme-icons/index"; const REGEXP_HEX: RegExp = /^#([0-9A-F]{6}|[0-9A-F]{8})$/i; @@ -98,7 +98,7 @@ function setWorkbenchOptions(accentSelected: string | undefined, config: any): v updateAccent(accentSelected); if (isMaterialTheme(themeID) && isMaterialThemeIcons(themeIconsID)) { - THEME_ICONS().then(() => askForWindowReload()); + THEME_ICONS().then(() => reloadWindow()); } }, reason => { vscode.window.showErrorMessage(reason); diff --git a/extensions/commands/theme-icons/index.ts b/extensions/commands/theme-icons/index.ts index a44a9eb..01bd686 100644 --- a/extensions/commands/theme-icons/index.ts +++ b/extensions/commands/theme-icons/index.ts @@ -48,7 +48,7 @@ export const THEME_ICONS = () => { deferred.resolve(); }); } else { - deferred.reject(); + deferred.resolve(); } return promise;