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 { 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() {
|
export function useShowAssistants() {
|
||||||
const showAssistants = useAppSelector((state) => state.settings.showAssistants)
|
const showAssistants = useAppSelector((state) => state.settings.showAssistants)
|
||||||
@ -7,6 +7,7 @@ export function useShowAssistants() {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
showAssistants,
|
showAssistants,
|
||||||
|
setShowAssistants: (show: boolean) => dispatch(setShowAssistants(show)),
|
||||||
toggleShowAssistants: () => dispatch(toggleShowAssistants())
|
toggleShowAssistants: () => dispatch(toggleShowAssistants())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,11 +54,13 @@ export default function useUpdateHandler() {
|
|||||||
downloadProgress: 0
|
downloadProgress: 0
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
window.modal.info({
|
if (window.location.hash.includes('settings/about')) {
|
||||||
title: t('settings.about.updateError'),
|
window.modal.info({
|
||||||
content: error?.message || t('settings.about.updateError'),
|
title: t('settings.about.updateError'),
|
||||||
icon: null
|
content: error?.message || t('settings.about.updateError'),
|
||||||
})
|
icon: null
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
return () => removers.forEach((remover) => remover())
|
return () => removers.forEach((remover) => remover())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user