From 6844c8f92e9678827e3727b7051efdf8abeab41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 2 Dec 2020 20:15:00 +0100 Subject: [PATCH] Hide spell-check settings if not using Electron --- src/vector/platform/ElectronPlatform.tsx | 8 ++++++++ src/vector/platform/WebPlatform.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 0dd57ef45f..10b72d63d1 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -324,6 +324,14 @@ export default class ElectronPlatform extends VectorBasePlatform { return 'Electron Platform'; // no translation required: only used for analytics } + /** + * Return true if platform supports multi-language + * spell-checking, otherwise false. + */ + supportsMultiLanguageSpellCheck(): boolean { + return true; + } + setNotificationCount(count: number) { if (this.notificationCount === count) return; super.setNotificationCount(count); diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index 2e739a2660..c2f3743609 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -38,6 +38,14 @@ export default class WebPlatform extends VectorBasePlatform { return 'Web Platform'; // no translation required: only used for analytics } + /** + * Return true if platform supports multi-language + * spell-checking, otherwise false. + */ + supportsMultiLanguageSpellCheck(): boolean { + return false; + } + /** * Returns true if the platform supports displaying * notifications, otherwise false.