Skip to content

Commit

Permalink
Merge branch 'development' into fix/597-select-folder-screen-has-inco…
Browse files Browse the repository at this point in the history
…rrect-root-name
  • Loading branch information
Alexander-Kezik authored Jan 30, 2024
2 parents 1c07d88 + ff21890 commit 7f1599f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/utils/app/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,20 @@ export const doesEntityContainSearchItem = <
item: T,
searchTerm: string,
) => {
if (!searchTerm) {
return true;
}
if ('messages' in item) {
// Conversation
return doesConversationContainSearchTerm(item, searchTerm);
} else if ('description' in item) {
} else if ('content' in item && 'description' in item) {
// Prompt
return doesPromptContainSearchTerm(item, searchTerm);
} else if ('contentType' in item) {
// DialFile
return doesFileContainSearchTerm(item, searchTerm);
}
throw new Error('unexpected entity');
return false;
};

export const TrueFilter: EntityFilter<ShareInterface> = () => true;
Expand Down

0 comments on commit 7f1599f

Please sign in to comment.