Calls Tab & Group Call Disposition
This commit is contained in:
parent
620e85ca01
commit
1eaabb6734
139 changed files with 9182 additions and 2721 deletions
31
ts/state/selectors/callHistory.ts
Normal file
31
ts/state/selectors/callHistory.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2023 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { createSelector } from 'reselect';
|
||||
import type { CallHistoryState } from '../ducks/callHistory';
|
||||
import type { StateType } from '../reducer';
|
||||
import type { CallHistoryDetails } from '../../types/CallDisposition';
|
||||
import { getOwn } from '../../util/getOwn';
|
||||
|
||||
const getCallHistory = (state: StateType): CallHistoryState =>
|
||||
state.callHistory;
|
||||
|
||||
export const getCallHistoryEdition = createSelector(
|
||||
getCallHistory,
|
||||
callHistory => {
|
||||
return callHistory.edition;
|
||||
}
|
||||
);
|
||||
|
||||
export type CallHistorySelectorType = (
|
||||
callId: string
|
||||
) => CallHistoryDetails | void;
|
||||
|
||||
export const getCallHistorySelector = createSelector(
|
||||
getCallHistory,
|
||||
(callHistory): CallHistorySelectorType => {
|
||||
return callId => {
|
||||
return getOwn(callHistory.callHistoryByCallId, callId);
|
||||
};
|
||||
}
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue