For distribution lists make sure we only use convos with uuid
This commit is contained in:
parent
faf6c41332
commit
0fc5976117
1 changed files with 13 additions and 10 deletions
|
@ -67,6 +67,17 @@ enum Page {
|
||||||
HideStoryFrom = 'HideStoryFrom',
|
HideStoryFrom = 'HideStoryFrom',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function filterConversations(
|
||||||
|
conversations: ReadonlyArray<ConversationType>,
|
||||||
|
searchTerm: string
|
||||||
|
) {
|
||||||
|
return filterAndSortConversationsByRecent(
|
||||||
|
conversations,
|
||||||
|
searchTerm,
|
||||||
|
undefined
|
||||||
|
).filter(conversation => conversation.uuid);
|
||||||
|
}
|
||||||
|
|
||||||
export const StoriesSettingsModal = ({
|
export const StoriesSettingsModal = ({
|
||||||
candidateConversations,
|
candidateConversations,
|
||||||
distributionLists,
|
distributionLists,
|
||||||
|
@ -99,11 +110,7 @@ export const StoriesSettingsModal = ({
|
||||||
const [searchTerm, setSearchTerm] = useState('');
|
const [searchTerm, setSearchTerm] = useState('');
|
||||||
|
|
||||||
const [filteredConversations, setFilteredConversations] = useState(
|
const [filteredConversations, setFilteredConversations] = useState(
|
||||||
filterAndSortConversationsByRecent(
|
filterConversations(candidateConversations, searchTerm)
|
||||||
candidateConversations,
|
|
||||||
searchTerm,
|
|
||||||
undefined
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const [selectedContacts, setSelectedContacts] = useState<
|
const [selectedContacts, setSelectedContacts] = useState<
|
||||||
|
@ -145,11 +152,7 @@ export const StoriesSettingsModal = ({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
setFilteredConversations(
|
setFilteredConversations(
|
||||||
filterAndSortConversationsByRecent(
|
filterConversations(candidateConversations, normalizedSearchTerm)
|
||||||
candidateConversations,
|
|
||||||
normalizedSearchTerm,
|
|
||||||
undefined
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}, 200);
|
}, 200);
|
||||||
return () => {
|
return () => {
|
||||||
|
|
Loading…
Reference in a new issue