"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ts/state/ducks/safetyNumber.ts" between
Signal-Desktop-1.35.2.tar.gz and Signal-Desktop-1.36.1.tar.gz

About: Signal-Desktop is a cross-platform encrypted messaging service (also available for mobile devices).

safetyNumber.ts  (Signal-Desktop-1.35.2):safetyNumber.ts  (Signal-Desktop-1.36.1)
skipping to change at line 65 skipping to change at line 65
type ToggleVerifiedPendingActionType = { type ToggleVerifiedPendingActionType = {
type: 'safetyNumber/TOGGLE_VERIFIED_PENDING'; type: 'safetyNumber/TOGGLE_VERIFIED_PENDING';
payload: ToggleVerifiedAsyncActionType; payload: ToggleVerifiedAsyncActionType;
}; };
type ToggleVerifiedFulfilledActionType = { type ToggleVerifiedFulfilledActionType = {
type: 'safetyNumber/TOGGLE_VERIFIED_FULFILLED'; type: 'safetyNumber/TOGGLE_VERIFIED_FULFILLED';
payload: ToggleVerifiedAsyncActionType; payload: ToggleVerifiedAsyncActionType;
}; };
export type SafetyNumberActionTypes = export type SafetyNumberActionType =
| GenerateActionType | GenerateActionType
| GenerateFulfilledActionType | GenerateFulfilledActionType
| ToggleVerifiedActionType | ToggleVerifiedActionType
| ToggleVerifiedPendingActionType | ToggleVerifiedPendingActionType
| ToggleVerifiedFulfilledActionType; | ToggleVerifiedFulfilledActionType;
function generate(contact: ConversationType): GenerateActionType { function generate(contact: ConversationType): GenerateActionType {
return { return {
type: GENERATE, type: GENERATE,
payload: doGenerate(contact), payload: doGenerate(contact),
skipping to change at line 164 skipping to change at line 164
}; };
function getEmptyState(): SafetyNumberStateType { function getEmptyState(): SafetyNumberStateType {
return { return {
contacts: {}, contacts: {},
}; };
} }
export function reducer( export function reducer(
state: SafetyNumberStateType = getEmptyState(), state: SafetyNumberStateType = getEmptyState(),
action: SafetyNumberActionTypes action: SafetyNumberActionType
): SafetyNumberStateType { ): SafetyNumberStateType {
if (action.type === TOGGLE_VERIFIED_PENDING) { if (action.type === TOGGLE_VERIFIED_PENDING) {
const { contact } = action.payload; const { contact } = action.payload;
const { id } = contact; const { id } = contact;
const record = state.contacts[id]; const record = state.contacts[id];
return { return {
contacts: { contacts: {
...state.contacts, ...state.contacts,
[id]: { [id]: {
...record, ...record,
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)