diff --git a/src/dashboardWebView/components/Contents/Item.tsx b/src/dashboardWebView/components/Contents/Item.tsx index 5f585d02..87772165 100644 --- a/src/dashboardWebView/components/Contents/Item.tsx +++ b/src/dashboardWebView/components/Contents/Item.tsx @@ -93,7 +93,9 @@ export const Item: React.FunctionComponent = ({ setFooterHtml(undefined); } }); + } + if (window.fmExternal && window.fmExternal.getCardImage) { window.fmExternal.getCardImage(fmFilePath, { fmFilePath, date, diff --git a/src/helpers/SettingsHelper.ts b/src/helpers/SettingsHelper.ts index 7e41d2dd..29469ee3 100644 --- a/src/helpers/SettingsHelper.ts +++ b/src/helpers/SettingsHelper.ts @@ -1,3 +1,4 @@ +import { SETTING_EXTENSIBILITY_SCRIPTS } from './../constants/settings'; import { parseWinPath } from './parseWinPath'; import { Telemetry } from './Telemetry'; import { Notifications } from './Notifications'; @@ -707,9 +708,24 @@ export class Settings { configJson, filePath ); + } else if (typeof configJson === 'string') { + Settings.mergeStringArray(`${CONFIG_KEY}.${relSettingName}`, configJson); } } + /** + * Merge the array setting in the global config + * @param key + * @param value + */ + private static mergeStringArray(key: string, value: string) { + // Merge the arrays + Settings.globalConfig[key] = [...(Settings.globalConfig[key] || []), value]; + Settings.globalConfig[key] = Settings.globalConfig[key].filter((item: any, index: number) => { + return Settings.globalConfig[key].indexOf(item) === index; + }, Settings.globalConfig[key]); + } + /** * Check if the setting name is equal or starts with the reference setting name * @param value