diff --git a/src/main.js b/src/main.js index 02f6853c..4dcddcbe 100644 --- a/src/main.js +++ b/src/main.js @@ -17,7 +17,7 @@ const { triggerDownloadUrl } = require('./app/downloads.ts') const { setupReleaseNotificationScheduler } = require('./app/githubReleaseNotification.service.js') const { initLaunchAtStartupListener } = require('./app/launchAtStartup.config.ts') const { runMigrations } = require('./app/migration.service.ts') -const { systemInfo, isLinux, isMac, isWindows, isSameExecution } = require('./app/system.utils.ts') +const { systemInfo, isLinux, isMac, isWindows, isSameExecution, clearFlatpakFontConfigCache } = require('./app/system.utils.ts') const { applyTheme } = require('./app/theme.config.ts') const { buildTitle } = require('./app/utils.ts') const { enableWebRequestInterceptor, disableWebRequestInterceptor } = require('./app/webRequestInterceptor.js') @@ -132,6 +132,7 @@ ipcMain.handle('app:getDesktopCapturerSources', async () => { thumbnail: source.thumbnail && !source.thumbnail.isEmpty() ? source.thumbnail.toDataURL() : null, })) }) +ipcMain.handle('app:cleanFlatpakFontConfigCache', () => clearFlatpakFontConfigCache()) /** * Whether the window is being relaunched. diff --git a/src/preload.js b/src/preload.js index 76c77402..8106ace8 100644 --- a/src/preload.js +++ b/src/preload.js @@ -80,6 +80,12 @@ const TALK_DESKTOP = { * @return {Promise<{ id: string, name: string, icon?: string }[]|null>} */ getDesktopCapturerSources: () => ipcRenderer.invoke('app:getDesktopCapturerSources'), + /** + * Clean Flatpak font config cache + * + * @return {Promise} - Error message if any + */ + cleanFlatpakFontConfigCache: () => ipcRenderer.invoke('app:cleanFlatpakFontConfigCache'), /** * Relaunch an entire application */ diff --git a/src/talk/renderer/Settings/DesktopSettingsSection.vue b/src/talk/renderer/Settings/DesktopSettingsSection.vue index b8cadac7..72fe8086 100644 --- a/src/talk/renderer/Settings/DesktopSettingsSection.vue +++ b/src/talk/renderer/Settings/DesktopSettingsSection.vue @@ -14,15 +14,19 @@ import NcRadioGroupButton from '@nextcloud/vue/components/NcRadioGroupButton' import IconThemeLightDark from 'vue-material-design-icons/ThemeLightDark.vue' import IconWeatherNight from 'vue-material-design-icons/WeatherNight.vue' import IconWeatherSunny from 'vue-material-design-icons/WeatherSunny.vue' +import DesktopSettingsSectionFlatpakFontCache from './components/DesktopSettingsSectionFlatpakFontCache.vue' import DesktopSettingsSectionRelaunchNote from './components/DesktopSettingsSectionRelaunchNote.vue' import UiFormBoxAudioOutput from './components/UiFormBoxAudioOutput.vue' import UiFormBoxSelectNative from './components/UiFormBoxSelectNative.vue' import UiFormGroupZoom from './components/UiFormGroupZoom.vue' +import { useDevMode } from '../../../shared/useDevMode.ts' import { useAppConfigStore } from './appConfig.store.ts' import { useAppConfigValue } from './useAppConfigValue.ts' const isLinux = window.systemInfo.isLinux +const isFlatpak = window.systemInfo.isFlatpak +const { isDevMode } = useDevMode() const { isRelaunchRequired } = storeToRefs(useAppConfigStore()) const launchAtStartup = useAppConfigValue('launchAtStartup') @@ -91,6 +95,10 @@ const secondarySpeakerDevice = useAppConfigValue('secondarySpeakerDevice') + + + + diff --git a/src/talk/renderer/Settings/components/DesktopSettingsSectionFlatpakFontCache.vue b/src/talk/renderer/Settings/components/DesktopSettingsSectionFlatpakFontCache.vue new file mode 100644 index 00000000..2ddff566 --- /dev/null +++ b/src/talk/renderer/Settings/components/DesktopSettingsSectionFlatpakFontCache.vue @@ -0,0 +1,48 @@ + + +