Archive Conversation
This commit is contained in:
parent
d72f89d776
commit
6ffbc0ac06
20 changed files with 568 additions and 109 deletions
|
@ -4,9 +4,9 @@ import { mapDispatchToProps } from '../actions';
|
|||
import { LeftPane } from '../../components/LeftPane';
|
||||
import { StateType } from '../reducer';
|
||||
|
||||
import { getQuery, getSearchResults, isSearching } from '../selectors/search';
|
||||
import { getSearchResults, isSearching } from '../selectors/search';
|
||||
import { getIntl } from '../selectors/user';
|
||||
import { getLeftPaneList, getMe } from '../selectors/conversations';
|
||||
import { getLeftPaneLists, getShowArchived } from '../selectors/conversations';
|
||||
|
||||
import { SmartMainHeader } from './MainHeader';
|
||||
|
||||
|
@ -17,12 +17,14 @@ const FilteredSmartMainHeader = SmartMainHeader as any;
|
|||
const mapStateToProps = (state: StateType) => {
|
||||
const showSearch = isSearching(state);
|
||||
|
||||
const lists = showSearch ? undefined : getLeftPaneLists(state);
|
||||
const searchResults = showSearch ? getSearchResults(state) : undefined;
|
||||
|
||||
return {
|
||||
...lists,
|
||||
searchResults,
|
||||
showArchived: getShowArchived(state),
|
||||
i18n: getIntl(state),
|
||||
me: getMe(state),
|
||||
query: getQuery(state),
|
||||
conversations: showSearch ? undefined : getLeftPaneList(state),
|
||||
searchResults: showSearch ? getSearchResults(state) : undefined,
|
||||
renderMainHeader: () => <FilteredSmartMainHeader />,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue