Added getAvailableSpellCheckLanguages() methods

This commit is contained in:
Šimon Brandner 2020-11-29 20:46:47 +01:00
parent ead00dcded
commit 38080c5b2b
2 changed files with 9 additions and 0 deletions

View File

@ -237,6 +237,10 @@ export default abstract class BasePlatform {
setLanguage(preferredLangs: string[]) {}
getAvailableSpellCheckLanguages(): Promise<string[]> | null {
return null;
}
protected getSSOCallbackUrl(fragmentAfterLogin: string): URL {
const url = new URL(window.location.href);
url.hash = fragmentAfterLogin || "";

View File

@ -353,6 +353,11 @@ export function setSpellCheckLanguages(preferredLangs: string[]) {
}
}
export async function getAvailableSpellCheckLanguages(): Promise<string[]> {
const plaf = PlatformPeg.get();
return plaf.getAvailableSpellCheckLanguages();
}
export function getAllLanguagesFromJson() {
return getLangsJson().then((langsObject) => {
const langs = [];