Fix TTS voice dropdown

This commit is contained in:
Natsumi
2025-10-07 04:31:40 +13:00
parent 5afcfb59fe
commit 53ccaf25e9
2 changed files with 10 additions and 13 deletions

View File

@@ -35,7 +35,7 @@
<template v-else-if="!friend.ref && !isRefreshFriendsLoading"> <template v-else-if="!friend.ref && !isRefreshFriendsLoading">
<span>{{ friend.name || friend.id }}</span> <span>{{ friend.name || friend.id }}</span>
<el-button <el-button
ttype="text" type="text"
:icon="Close" :icon="Close"
size="small" size="small"
style="margin-left: 5px" style="margin-left: 5px"

View File

@@ -14,7 +14,7 @@ export const useNotificationsSettingsStore = defineStore(
const { t } = useI18n(); const { t } = useI18n();
const state = reactive({ const state = reactive({
overlayToast: true, overlayToast: 'Game Running',
openVR: false, openVR: false,
overlayNotifications: true, overlayNotifications: true,
xsNotifications: true, xsNotifications: true,
@@ -172,21 +172,18 @@ export const useNotificationsSettingsStore = defineStore(
state.notificationTTS = notificationTTS; state.notificationTTS = notificationTTS;
state.notificationTTSNickName = notificationTTSNickName; state.notificationTTSNickName = notificationTTSNickName;
state.sharedFeedFilters = JSON.parse(sharedFeedFilters); state.sharedFeedFilters = JSON.parse(sharedFeedFilters);
state.notificationTTSVoice = notificationTTSVoice; state.notificationTTSVoice = Number(notificationTTSVoice);
state.TTSvoices = speechSynthesis.getVoices(); state.TTSvoices = speechSynthesis.getVoices();
state.notificationPosition = notificationPosition; state.notificationPosition = notificationPosition;
state.notificationTimeout = notificationTimeout; state.notificationTimeout = Number(notificationTimeout);
initSharedFeedFilters(); initSharedFeedFilters();
if (LINUX) { setTimeout(() => {
setTimeout(() => { // some workaround for failing to get voice list first run
updateTTSVoices(); updateTTSVoices();
}, 5000); }, 5000);
}
} }
// some workaround for failing to get voice list first run
speechSynthesis.getVoices();
initNotificationsSettings(); initNotificationsSettings();
@@ -361,7 +358,7 @@ export const useNotificationsSettingsStore = defineStore(
state.notificationTTSVoice = index; state.notificationTTSVoice = index;
configRepository.setString( configRepository.setString(
'VRCX_notificationTTSVoice', 'VRCX_notificationTTSVoice',
state.notificationTTSVoice state.notificationTTSVoice.toString()
); );
} }
@@ -467,7 +464,7 @@ export const useNotificationsSettingsStore = defineStore(
); );
await configRepository.setString( await configRepository.setString(
'VRCX_notificationTimeout', 'VRCX_notificationTimeout',
state.notificationTimeout state.notificationTimeout.toString()
); );
vrStore.updateVRConfigVars(); vrStore.updateVRConfigVars();
} }