mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-29 14:00:48 +08:00
Improved language search
This commit is contained in:
parent
48a3154ab6
commit
3c199d8c78
@ -24,7 +24,7 @@ import SettingsStore from "../../../settings/SettingsStore";
|
|||||||
import { _t } from "../../../languageHandler";
|
import { _t } from "../../../languageHandler";
|
||||||
|
|
||||||
function languageMatchesSearchQuery(query, language) {
|
function languageMatchesSearchQuery(query, language) {
|
||||||
if (language.label.toUpperCase().includes(query.toUpperCase())) return true;
|
if (language.label.toUpperCase().startsWith(query.toUpperCase())) return true;
|
||||||
if (language.value.toUpperCase() === query.toUpperCase()) return true;
|
if (language.value.toUpperCase() === query.toUpperCase()) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user