Typing while the emoji picker is up should enter search mode
This commit is contained in:
parent
e9f4e28b3d
commit
a52bb25731
4 changed files with 65 additions and 30 deletions
|
@ -1,4 +1,4 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// Copyright 2021-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { map, size } from './iterables';
|
||||
|
@ -12,3 +12,11 @@ export function count(str: string): number {
|
|||
const segments = new Intl.Segmenter().segment(str);
|
||||
return size(segments);
|
||||
}
|
||||
|
||||
export function isSingleGrapheme(str: string): boolean {
|
||||
if (str === '') {
|
||||
return false;
|
||||
}
|
||||
const segments = new Intl.Segmenter().segment(str);
|
||||
return segments.containing(0).segment === str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue