Archive Conversation
This commit is contained in:
parent
d72f89d776
commit
6ffbc0ac06
20 changed files with 568 additions and 109 deletions
|
@ -2,14 +2,16 @@ import { compact } from 'lodash';
|
|||
import { createSelector } from 'reselect';
|
||||
|
||||
import { StateType } from '../reducer';
|
||||
import { SearchStateType } from '../ducks/search';
|
||||
|
||||
import { SearchStateType } from '../ducks/search';
|
||||
import {
|
||||
getConversationLookup,
|
||||
getSelectedConversation,
|
||||
} from './conversations';
|
||||
import { ConversationLookupType } from '../ducks/conversations';
|
||||
|
||||
import { getRegionCode } from './user';
|
||||
|
||||
export const getSearch = (state: StateType): SearchStateType => state.search;
|
||||
|
||||
export const getQuery = createSelector(
|
||||
|
@ -34,12 +36,14 @@ export const isSearching = createSelector(
|
|||
export const getSearchResults = createSelector(
|
||||
[
|
||||
getSearch,
|
||||
getRegionCode,
|
||||
getConversationLookup,
|
||||
getSelectedConversation,
|
||||
getSelectedMessage,
|
||||
],
|
||||
(
|
||||
state: SearchStateType,
|
||||
regionCode: string,
|
||||
lookup: ConversationLookupType,
|
||||
selectedConversation?: string,
|
||||
selectedMessage?: string
|
||||
|
@ -84,6 +88,7 @@ export const getSearchResults = createSelector(
|
|||
|
||||
return message;
|
||||
}),
|
||||
regionCode: regionCode,
|
||||
searchTerm: state.query,
|
||||
showStartNewConversation: Boolean(
|
||||
state.normalizedPhoneNumber && !lookup[state.normalizedPhoneNumber]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue