Stickers
Co-authored-by: scott@signal.org Co-authored-by: ken@signal.org
This commit is contained in:
parent
8c8856785b
commit
29de50c12a
100 changed files with 7572 additions and 693 deletions
|
@ -1,8 +1,11 @@
|
|||
import { AnyAction } from 'redux';
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
|
||||
// State
|
||||
|
||||
export type UserStateType = {
|
||||
attachmentsPath: string;
|
||||
stickersPath: string;
|
||||
ourNumber: string;
|
||||
regionCode: string;
|
||||
i18n: LocalizerType;
|
||||
|
@ -18,7 +21,7 @@ type UserChangedActionType = {
|
|||
};
|
||||
};
|
||||
|
||||
export type UserActionType = UserChangedActionType;
|
||||
export type UserActionType = AnyAction | UserChangedActionType;
|
||||
|
||||
// Action Creators
|
||||
|
||||
|
@ -40,6 +43,8 @@ function userChanged(attributes: {
|
|||
|
||||
function getEmptyState(): UserStateType {
|
||||
return {
|
||||
attachmentsPath: 'missing',
|
||||
stickersPath: 'missing',
|
||||
ourNumber: 'missing',
|
||||
regionCode: 'missing',
|
||||
i18n: () => 'missing',
|
||||
|
@ -47,7 +52,7 @@ function getEmptyState(): UserStateType {
|
|||
}
|
||||
|
||||
export function reducer(
|
||||
state: UserStateType,
|
||||
state: UserStateType = getEmptyState(),
|
||||
action: UserActionType
|
||||
): UserStateType {
|
||||
if (!state) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue