|
|
@@ -36,13 +36,11 @@ const storage = { |
|
|
|
}; |
|
|
|
|
|
|
|
if (isClient && window.addIpcRendererListener) { |
|
|
|
console.log('try to reload local data'); |
|
|
|
storage.clear(); |
|
|
|
window.addIpcRendererListener( |
|
|
|
'initialStorageData', |
|
|
|
(_, hash: { keyList?: string[]; [key: string]: any }) => { |
|
|
|
const kList = hash.keyList || []; |
|
|
|
console.log('reload data:', hash); |
|
|
|
kList.forEach((key: string) => { |
|
|
|
keepSaveKeyMap.set(key, true); |
|
|
|
storage.set(key, hash[key]); |
|
|
|