Adds message forwarding
This commit is contained in:
parent
cd489a35fd
commit
d203f125c6
42 changed files with 1638 additions and 139 deletions
16
ts/state/selectors/emojis.ts
Normal file
16
ts/state/selectors/emojis.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { createSelector } from 'reselect';
|
||||
import { useSelector } from 'react-redux';
|
||||
|
||||
import { StateType } from '../reducer';
|
||||
import { isShortName } from '../../components/emoji/lib';
|
||||
|
||||
export const selectRecentEmojis = createSelector(
|
||||
({ emojis }: StateType) => emojis.recents,
|
||||
recents => recents.filter(isShortName)
|
||||
);
|
||||
|
||||
export const useRecentEmojis = (): Array<string> =>
|
||||
useSelector(selectRecentEmojis);
|
Loading…
Add table
Add a link
Reference in a new issue