"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "ts/state/smart/TimelineItem.tsx" 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).

TimelineItem.tsx  (Signal-Desktop-1.35.2):TimelineItem.tsx  (Signal-Desktop-1.36.1)
import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { mapDispatchToProps } from '../actions'; import { mapDispatchToProps } from '../actions';
import { StateType } from '../reducer'; import { StateType } from '../reducer';
import { TimelineItem } from '../../components/conversation/TimelineItem'; import { TimelineItem } from '../../components/conversation/TimelineItem';
import { getIntl } from '../selectors/user'; import { getIntl } from '../selectors/user';
import { import {
getMessageSelector, getMessageSelector,
getSelectedMessage, getSelectedMessage,
} from '../selectors/conversations'; } from '../selectors/conversations';
import { SmartContactName } from './ContactName';
type ExternalProps = { type ExternalProps = {
id: string; id: string;
conversationId: string; conversationId: string;
}; };
// Workaround: A react component's required properties are filtering up through
connect()
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31363
const FilteredSmartContactName = SmartContactName as any;
function renderContact(conversationId: string): JSX.Element {
return <FilteredSmartContactName conversationId={conversationId} />;
}
const mapStateToProps = (state: StateType, props: ExternalProps) => { const mapStateToProps = (state: StateType, props: ExternalProps) => {
const { id, conversationId } = props; const { id, conversationId } = props;
const messageSelector = getMessageSelector(state); const messageSelector = getMessageSelector(state);
const item = messageSelector(id); const item = messageSelector(id);
const selectedMessage = getSelectedMessage(state); const selectedMessage = getSelectedMessage(state);
const isSelected = Boolean(selectedMessage && id === selectedMessage.id); const isSelected = Boolean(selectedMessage && id === selectedMessage.id);
return { return {
item, item,
id, id,
conversationId, conversationId,
isSelected, isSelected,
renderContact,
i18n: getIntl(state), i18n: getIntl(state),
}; };
}; };
const smart = connect(mapStateToProps, mapDispatchToProps); const smart = connect(mapStateToProps, mapDispatchToProps);
export const SmartTimelineItem = smart(TimelineItem); export const SmartTimelineItem = smart(TimelineItem);
 End of changes. 4 change blocks. 
0 lines changed or deleted 13 lines changed or added

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