修复初始化搜索历史列表功能
parent
1c4e9ed474
commit
d32d5d0eb8
|
@ -48,7 +48,6 @@ const names = {
|
|||
get_playlist: 'get_playlist',
|
||||
save_playlist: 'save_playlist',
|
||||
get_data: 'get_data',
|
||||
set_data: 'set_data',
|
||||
save_data: 'save_data',
|
||||
get_hot_key: 'get_hot_key',
|
||||
},
|
||||
|
|
|
@ -94,7 +94,7 @@ export default {
|
|||
})
|
||||
}, 1000)
|
||||
this.saveSearchHistoryList = throttle(n => {
|
||||
rendererSend(NAMES.mainWindow.set_data, {
|
||||
rendererSend(NAMES.mainWindow.save_data, {
|
||||
path: 'searchHistoryList',
|
||||
data: n,
|
||||
})
|
||||
|
@ -292,7 +292,7 @@ export default {
|
|||
rendererInvoke(NAMES.mainWindow.get_data, 'searchHistoryList').then(historyList => {
|
||||
if (historyList == null) {
|
||||
historyList = []
|
||||
rendererInvoke(NAMES.mainWindow.set_data, { path: 'searchHistoryList', data: historyList })
|
||||
rendererSend(NAMES.mainWindow.save_data, { path: 'searchHistoryList', data: historyList })
|
||||
} else {
|
||||
this.setSearchHistoryList(historyList)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue