feat: added setshowassistants function to useshowassistants hook and updated error handling logic
This commit is contained in:
parent
6af07c278d
commit
7d561dbfb7
@ -1,5 +1,5 @@
|
||||
import { useAppDispatch, useAppSelector } from '@renderer/store'
|
||||
import { setShowTopics, toggleShowAssistants, toggleShowTopics } from '@renderer/store/settings'
|
||||
import { setShowAssistants, setShowTopics, toggleShowAssistants, toggleShowTopics } from '@renderer/store/settings'
|
||||
|
||||
export function useShowAssistants() {
|
||||
const showAssistants = useAppSelector((state) => state.settings.showAssistants)
|
||||
@ -7,6 +7,7 @@ export function useShowAssistants() {
|
||||
|
||||
return {
|
||||
showAssistants,
|
||||
setShowAssistants: (show: boolean) => dispatch(setShowAssistants(show)),
|
||||
toggleShowAssistants: () => dispatch(toggleShowAssistants())
|
||||
}
|
||||
}
|
||||
|
||||
@ -54,11 +54,13 @@ export default function useUpdateHandler() {
|
||||
downloadProgress: 0
|
||||
})
|
||||
)
|
||||
window.modal.info({
|
||||
title: t('settings.about.updateError'),
|
||||
content: error?.message || t('settings.about.updateError'),
|
||||
icon: null
|
||||
})
|
||||
if (window.location.hash.includes('settings/about')) {
|
||||
window.modal.info({
|
||||
title: t('settings.about.updateError'),
|
||||
content: error?.message || t('settings.about.updateError'),
|
||||
icon: null
|
||||
})
|
||||
}
|
||||
})
|
||||
]
|
||||
return () => removers.forEach((remover) => remover())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user