fix: do not register new ipc event listener when main screen component is loaded (fixes #176)
This commit is contained in:
1 parent
52ffc48cde
commit
a71feb8a08
5 files changed
+46
-19
No files matched your search
@@ -17,12 +17,13 @@ onMounted((): void => {
|
||||
languages.value = availableLocales
|
||||
|
||||
// Get application version from package.json version string (Using IPC communication)
|
||||
window.mainApi.receive('msgReceivedVersion', (event: Event, version: string) => {
|
||||
appVersion.value = version
|
||||
})
|
||||
window.mainApi.send('msgRequestGetVersion')
|
||||
getApplicationVersionFromMainProcess()
|
||||
})
|
||||
|
||||
const getApplicationVersionFromMainProcess = (): void => {
|
||||
appVersion.value = window.mainApi.sendSync('msgRequestGetVersion')
|
||||
}
|
||||
|
||||
const handleChangeTheme = (): void => {
|
||||
theme.global.name.value = theme.global.current.value.dark ? 'light' : 'dark'
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user