Merge pull request #236 from equinusocio/ux/reload-notification

Chore: revert 4 options on notification
This commit is contained in:
Alessio Occhipinti 2018-08-15 22:00:34 +02:00 committed by GitHub
commit 240980fbc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 17 deletions

View file

@ -1,4 +1,4 @@
import {isAutoApplyEnable, isReloadNotificationEnable, setCustomSetting} from './settings'; import {isAutoApplyEnable, isReloadNotificationEnable} from './settings';
import {infoMessage} from './messages'; import {infoMessage} from './messages';
import {fixIcons} from '../commands'; import {fixIcons} from '../commands';
@ -17,14 +17,6 @@ export default async (doubleCheck: boolean) => {
const result = await infoMessage(); const result = await infoMessage();
if (result.nomore) {
return setCustomSetting('showReloadNotification', false);
}
if (result.autoreload) {
setCustomSetting('autoApplyIcons', true);
}
if (result.reload) { if (result.reload) {
return fixIcons(); return fixIcons();
} }

View file

@ -5,7 +5,7 @@ import {
const MESSAGES = { const MESSAGES = {
INFO: { INFO: {
message: 'Do you want to reload to apply Material Theme Icons to enjoy the full experience?', message: 'Do you want to reload to apply Material Theme Icons to enjoy the full experience?',
options: {ok: 'Yeah, reload', autoreload: 'Yes and enable auto-reload', cancel: 'No, thank you', nomore: 'Never show again'} options: {ok: 'Yeah, reload', cancel: 'No, thank you'}
}, },
CHANGELOG: { CHANGELOG: {
message: 'Material Theme was updated. Check the release notes for more details.', message: 'Material Theme was updated. Check the release notes for more details.',
@ -21,18 +21,12 @@ export const infoMessage = async () => {
const result = await Window.showInformationMessage( const result = await Window.showInformationMessage(
MESSAGES.INFO.message, MESSAGES.INFO.message,
MESSAGES.INFO.options.ok, MESSAGES.INFO.options.ok,
MESSAGES.INFO.options.autoreload, MESSAGES.INFO.options.cancel
MESSAGES.INFO.options.cancel,
MESSAGES.INFO.options.nomore
); );
switch (result) { switch (result) {
case MESSAGES.INFO.options.ok: case MESSAGES.INFO.options.ok:
return {reload: true}; return {reload: true};
case MESSAGES.INFO.options.autoreload:
return {reload: true, autoreload: true};
case MESSAGES.INFO.options.nomore:
return {nomore: true};
default: default:
return {}; return {};
} }