Search for username in compose mode
This commit is contained in:
parent
6731cc6629
commit
cbae7f8ee9
36 changed files with 997 additions and 72 deletions
|
@ -107,6 +107,12 @@ export const getConversationsByGroupId = createSelector(
|
|||
return state.conversationsByGroupId;
|
||||
}
|
||||
);
|
||||
export const getConversationsByUsername = createSelector(
|
||||
getConversations,
|
||||
(state: ConversationsStateType): ConversationLookupType => {
|
||||
return state.conversationsByUsername;
|
||||
}
|
||||
);
|
||||
|
||||
const getAllConversations = createSelector(
|
||||
getConversationLookup,
|
||||
|
@ -397,6 +403,24 @@ export const getComposerConversationSearchTerm = createSelector(
|
|||
}
|
||||
);
|
||||
|
||||
export const getIsFetchingUsername = createSelector(
|
||||
getComposerState,
|
||||
(composer): boolean => {
|
||||
if (!composer) {
|
||||
assert(false, 'getIsFetchingUsername: composer is not open');
|
||||
return false;
|
||||
}
|
||||
if (composer.step !== ComposerStep.StartDirectConversation) {
|
||||
assert(
|
||||
false,
|
||||
`getIsFetchingUsername: step ${composer.step} has no isFetchingUsername key`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
return composer.isFetchingUsername;
|
||||
}
|
||||
);
|
||||
|
||||
function isTrusted(conversation: ConversationType): boolean {
|
||||
if (conversation.type === 'group') {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue