2019-01-14 21:49:58 +00:00
|
|
|
import { combineReducers } from 'redux';
|
|
|
|
|
2020-06-04 18:16:19 +00:00
|
|
|
import {
|
|
|
|
CallingActionType,
|
|
|
|
CallingStateType,
|
|
|
|
reducer as calling,
|
|
|
|
} from './ducks/calling';
|
2019-01-14 21:49:58 +00:00
|
|
|
import {
|
2019-05-16 22:32:11 +00:00
|
|
|
ConversationActionType,
|
2019-01-14 21:49:58 +00:00
|
|
|
ConversationsStateType,
|
|
|
|
reducer as conversations,
|
|
|
|
} from './ducks/conversations';
|
2019-05-24 23:58:27 +00:00
|
|
|
import {
|
|
|
|
EmojisActionType,
|
|
|
|
EmojisStateType,
|
|
|
|
reducer as emojis,
|
|
|
|
} from './ducks/emojis';
|
2020-02-12 21:30:58 +00:00
|
|
|
import {
|
|
|
|
ExpirationActionType,
|
|
|
|
ExpirationStateType,
|
|
|
|
reducer as expiration,
|
|
|
|
} from './ducks/expiration';
|
2019-05-16 22:32:11 +00:00
|
|
|
import {
|
|
|
|
ItemsActionType,
|
|
|
|
ItemsStateType,
|
|
|
|
reducer as items,
|
|
|
|
} from './ducks/items';
|
2020-02-12 21:30:58 +00:00
|
|
|
import {
|
|
|
|
NetworkActionType,
|
|
|
|
NetworkStateType,
|
|
|
|
reducer as network,
|
|
|
|
} from './ducks/network';
|
2020-06-26 00:08:58 +00:00
|
|
|
import {
|
|
|
|
reducer as safetyNumber,
|
2020-09-09 22:50:44 +00:00
|
|
|
SafetyNumberActionType,
|
2020-06-26 00:08:58 +00:00
|
|
|
SafetyNumberStateType,
|
|
|
|
} from './ducks/safetyNumber';
|
2019-05-16 22:32:11 +00:00
|
|
|
import {
|
|
|
|
reducer as search,
|
2020-09-09 22:50:44 +00:00
|
|
|
SearchActionType,
|
2019-05-16 22:32:11 +00:00
|
|
|
SearchStateType,
|
|
|
|
} from './ducks/search';
|
|
|
|
import {
|
|
|
|
reducer as stickers,
|
|
|
|
StickersActionType,
|
|
|
|
StickersStateType,
|
|
|
|
} from './ducks/stickers';
|
2020-02-12 21:30:58 +00:00
|
|
|
import {
|
|
|
|
reducer as updates,
|
|
|
|
UpdatesActionType,
|
|
|
|
UpdatesStateType,
|
|
|
|
} from './ducks/updates';
|
2019-01-14 21:49:58 +00:00
|
|
|
import { reducer as user, UserStateType } from './ducks/user';
|
|
|
|
|
|
|
|
export type StateType = {
|
2020-06-04 18:16:19 +00:00
|
|
|
calling: CallingStateType;
|
2019-01-14 21:49:58 +00:00
|
|
|
conversations: ConversationsStateType;
|
2019-05-24 23:58:27 +00:00
|
|
|
emojis: EmojisStateType;
|
2020-02-12 21:30:58 +00:00
|
|
|
expiration: ExpirationStateType;
|
2019-05-16 22:32:11 +00:00
|
|
|
items: ItemsStateType;
|
2020-02-12 21:30:58 +00:00
|
|
|
network: NetworkStateType;
|
2020-06-26 00:08:58 +00:00
|
|
|
safetyNumber: SafetyNumberStateType;
|
2019-05-16 22:32:11 +00:00
|
|
|
search: SearchStateType;
|
|
|
|
stickers: StickersStateType;
|
2020-02-12 21:30:58 +00:00
|
|
|
updates: UpdatesStateType;
|
2019-01-14 21:49:58 +00:00
|
|
|
user: UserStateType;
|
|
|
|
};
|
|
|
|
|
2019-05-16 22:32:11 +00:00
|
|
|
export type ActionsType =
|
2020-06-04 18:16:19 +00:00
|
|
|
| CallingActionType
|
2019-05-24 23:58:27 +00:00
|
|
|
| EmojisActionType
|
2020-02-12 21:30:58 +00:00
|
|
|
| ExpirationActionType
|
2019-05-16 22:32:11 +00:00
|
|
|
| ConversationActionType
|
2019-05-24 23:58:27 +00:00
|
|
|
| ItemsActionType
|
2020-02-12 21:30:58 +00:00
|
|
|
| NetworkActionType
|
2020-09-09 22:50:44 +00:00
|
|
|
| SafetyNumberActionType
|
2019-05-16 22:32:11 +00:00
|
|
|
| StickersActionType
|
2020-02-12 21:30:58 +00:00
|
|
|
| SearchActionType
|
|
|
|
| UpdatesActionType;
|
2019-05-16 22:32:11 +00:00
|
|
|
|
2019-01-14 21:49:58 +00:00
|
|
|
export const reducers = {
|
2020-06-04 18:16:19 +00:00
|
|
|
calling,
|
2019-01-14 21:49:58 +00:00
|
|
|
conversations,
|
2019-05-24 23:58:27 +00:00
|
|
|
emojis,
|
2020-02-12 21:30:58 +00:00
|
|
|
expiration,
|
2019-05-16 22:32:11 +00:00
|
|
|
items,
|
2020-02-12 21:30:58 +00:00
|
|
|
network,
|
2020-06-26 00:08:58 +00:00
|
|
|
safetyNumber,
|
2019-05-16 22:32:11 +00:00
|
|
|
search,
|
|
|
|
stickers,
|
2020-02-12 21:30:58 +00:00
|
|
|
updates,
|
2019-01-14 21:49:58 +00:00
|
|
|
user,
|
|
|
|
};
|
|
|
|
|
2020-09-14 21:56:35 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
export const reducer = combineReducers<StateType, ActionsType>(reducers as any);
|