mirror of
https://github.com/laurent22/joplin.git
synced 2026-02-04 14:19:22 -06:00
Mobile: Feature flags: Fix "voice typing" feature flag (#13981)
This commit is contained in:
@@ -213,7 +213,7 @@ const modelLocalFilepath = () => {
|
||||
};
|
||||
|
||||
const whisper: VoiceTypingProvider = {
|
||||
supported: () => !!SpeechToTextModule && Setting.value('featureFlag.voiceTypingEnabled'),
|
||||
supported: () => !!SpeechToTextModule && Setting.value('buildFlag.voiceTypingEnabled'),
|
||||
modelLocalFilepath: modelLocalFilepath,
|
||||
getDownloadUrl: (locale) => {
|
||||
const lang = languageCodeOnly(locale).toLowerCase();
|
||||
|
||||
@@ -16,9 +16,10 @@ const customCssFilePath = (Setting: typeof SettingType, filename: string): strin
|
||||
return `${Setting.value('rootProfileDir')}/${filename}`;
|
||||
};
|
||||
|
||||
const showVoiceTypingSettings = () => (
|
||||
type VoiceTypingSettingSlice = Record<'buildFlag.voiceTypingEnabled', boolean>;
|
||||
const showVoiceTypingSettings = (settings: VoiceTypingSettingSlice) => (
|
||||
// For now, iOS and web don't support voice typing.
|
||||
shim.mobilePlatform() === 'android'
|
||||
shim.mobilePlatform() === 'android' && !!settings['buildFlag.voiceTypingEnabled']
|
||||
);
|
||||
|
||||
export enum CameraDirection {
|
||||
@@ -1910,14 +1911,12 @@ const builtInMetadata = (Setting: typeof SettingType) => {
|
||||
// As of December 2025, the voice typing feature doesn't work well on low-resource devices.
|
||||
// There have been requests to allow disabling the voice typing feature at build time. This
|
||||
// feature flag allows doing so, by changing the default `value` from `true` to `false`:
|
||||
'featureFlag.voiceTypingEnabled': {
|
||||
'buildFlag.voiceTypingEnabled': {
|
||||
value: true,
|
||||
type: SettingItemType.Bool,
|
||||
public: false,
|
||||
appTypes: [AppType.Mobile],
|
||||
label: () => 'Voice typing: Enable the voice typing feature',
|
||||
section: 'note',
|
||||
advanced: true,
|
||||
},
|
||||
|
||||
'survey.webClientEval2025.progress': {
|
||||
@@ -1984,7 +1983,7 @@ const builtInMetadata = (Setting: typeof SettingType) => {
|
||||
appTypes: [AppType.Mobile],
|
||||
label: () => _('Voice typing: Glossary'),
|
||||
description: () => _('A comma-separated list of words. May be used for uncommon words, to help voice typing spell them correctly.'),
|
||||
show: () => showVoiceTypingSettings(),
|
||||
show: showVoiceTypingSettings,
|
||||
section: 'note',
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user