Let users customize the preferred reaction palette
This commit is contained in:
parent
7a5385e00a
commit
f28456c160
38 changed files with 1788 additions and 124 deletions
22
ts/state/selectors/preferredReactions.ts
Normal file
22
ts/state/selectors/preferredReactions.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
import type { StateType } from '../reducer';
|
||||
import type { PreferredReactionsStateType } from '../ducks/preferredReactions';
|
||||
|
||||
const getPreferredReactionsState = (
|
||||
state: Readonly<StateType>
|
||||
): PreferredReactionsStateType => state.preferredReactions;
|
||||
|
||||
export const getCustomizeModalState = createSelector(
|
||||
getPreferredReactionsState,
|
||||
(state: Readonly<PreferredReactionsStateType>) =>
|
||||
state.customizePreferredReactionsModal
|
||||
);
|
||||
|
||||
export const getIsCustomizingPreferredReactions = createSelector(
|
||||
getCustomizeModalState,
|
||||
(customizeModal): boolean => Boolean(customizeModal)
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue