Skip to content

Commit

Permalink
fix: OUTPUT Flash News 开关提示
Browse files Browse the repository at this point in the history
  • Loading branch information
giscafer committed Aug 4, 2022
1 parent af59f2d commit b2f4429
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/registerCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function registerViewEvent(
commands.registerCommand('leek-fund.toggleFlashNews', () => {
const isEnable = LeekFundConfig.getConfig('leek-fund.flash-news');
LeekFundConfig.setConfig('leek-fund.flash-news', !isEnable).then(() => {
window.showInformationMessage(`已${isEnable ? '启用' : '关闭'} OUTPUT 的 Flash News!`);
window.showInformationMessage(`已${isEnable ? '关闭' : '启用'} OUTPUT 的 Flash News!`);
});
});

Expand Down Expand Up @@ -179,9 +179,7 @@ export function registerViewEvent(
return;
}
// 存储到配置的时候是接口的参数格式,接口请求时不需要再转换
const newCode = code
.replace('gb', 'gb_')
.replace('us', 'usr_');
const newCode = code.replace('gb', 'gb_').replace('us', 'usr_');
LeekFundConfig.updateStockCfg(newCode, () => {
stockProvider.refresh();
});
Expand Down

0 comments on commit b2f4429

Please sign in to comment.